Skip to content

SirHarveyBix/Blog

Repository files navigation

Getting Started

First, edit .env.sample file, and create a Mongodb database & cluster

Then, run the development server:

# front :
yarn dev
# back
yarn gql

Initialize Servers

Open http://localhost:3000 with your browser to see the result.

Frontend

The Frontend : www.gui-dev.fr

Hosted by vercel : admin panel

--> consider to fill the information in > General, Git, & Environement Variables

--> you can add a .vercelignore file to force vercel not to deploys certains files / folder like "utils"

Backend

The Backend : bloggql.up.railway.app

Hosted by railway.app

--> consider to editing Config Vars as you did in .env file : Details

MongoDB

I choose to user MongoDB ATLAS, if you keep this choice, you must create a free M0 Cluster to store your datas, once proceed, dont forget to add your domain IP (Ionos), to the IP whitelist : Project > security > Network Access

Write Articles

To add new article go to utils/posts, write it on MarkDown, as a readme. I used react-markdown to implement. just create a new file: [FILENAME].md

To write a new post, make sure that you created your FILENAME.md on utils/posts folder, edit the header as it follows :

---
title: "Let's enjoy Markdown"
date: '2022-02-17'
image: working-cat.jpeg // including extension
excerpt: 'MarkDown, React and Next.JS'
isFeatured: true
---

Images must be stored in /public/images/posts/[ARTICLE-FILENAME], and be well-named in the header of article, otherwise, images won't be shown.

Before deploying your onwn app, edit meta tags on pages

Deployed

Frontend : www.gui-dev.fr

Backend : bloggql.up.railway.app

Contributors