Skip to content
/ golb Public

Pretty SSR blogging website using Next.js and Express.js

Notifications You must be signed in to change notification settings

duongdev/golb

Repository files navigation

GOLB Community

screenshot

Note: This project is for demo purpose, which means it's not yet ready for production.

Pretty SSR blogging website using Next.js and Express.js.

Features

  • Guest users can read all the posts but cannot comment until they login.

  • Authenticated users can create/update/delete their own posts, as well as comment on all other posts using their credentials.

  • Everyone can login using his/her GitHub or Twitter (coming soon) account.

  • Everyone can search/filter posts using keywords that match the post title and body.

  • Post list can be paginated.

Demo

See the public demo of the GOLB community!

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes

Prerequisites

  • Node.js 12.0+

  • MongoDB 4.2.7+

  • GitHub OAuth app. Create here.

Installing

Clone the repository:

git clone https://github.com/duongdev/golb.git

Enter the project directory:

cd golb

Install NPM dependencies:

yarn

Add .env files:

# packages/server/.env
GH_CLIENT_ID=     # GitHub app client ID
GH_CLIENT_SECRET= # GitHub app client secret
JWT_SECRET=       # JsonWebToken secret key
MONGO_URI=        # MongoDB server URI
# packages/web/.env
NEXT_PUBLIC_GH_CLIENT_ID= # GitHub app client ID
NEXT_PUBLIC_SERVER_URI=   # Address of the server

Development

Run the development servers:

# Web
yarn workspace web dev
# Server
yarn workspace server watch:dev

Go to http://localhost:3000 to access the website and http://localhost:4000 to access express server.

Production

Build the web and server:

# Web
yarn workspace web build
# Server
yarn workspace server build

Start the production servers:

# Web
yarn workspace web start
# Server
yarn workspace server start

About

Pretty SSR blogging website using Next.js and Express.js

Topics

Resources

Stars

Watchers

Forks