https://github.com/duongdev/golb
Pretty SSR blogging website using Next.js and Express.js
https://github.com/duongdev/golb
express nextjs
Last synced: 2 months ago
JSON representation
Pretty SSR blogging website using Next.js and Express.js
- Host: GitHub
- URL: https://github.com/duongdev/golb
- Owner: duongdev
- Created: 2020-07-31T15:18:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T17:55:58.000Z (over 2 years ago)
- Last Synced: 2026-03-27T04:09:11.102Z (2 months ago)
- Topics: express, nextjs
- Language: JavaScript
- Homepage: https://golb.duong.work
- Size: 1.97 MB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GOLB Community

**_Note_**: _This project is for demo purpose, which means it's not yet ready for production._
Pretty SSR blogging website using [Next.js](http://nextjs.org) and Express.js.
## Features
- [x] Guest users can read all the posts but cannot comment until they login.
- [x] Authenticated users can create/update/delete their own posts, as well as comment on all other posts using their credentials.
- [x] Everyone can login using his/her GitHub or _Twitter (coming soon)_ account.
- [x] Everyone can search/filter posts using keywords that match the post title and body.
- [x] Post list can be paginated.
## Demo
See the [public demo](https://golb.duong.work/) 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](https://github.com/settings/applications/new).
### Installing
Clone the repository:
```bash
git clone https://github.com/duongdev/golb.git
```
Enter the project directory:
```bash
cd golb
```
Install NPM dependencies:
```bash
yarn
```
Add `.env` files:
```bash
# 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
```
```bash
# 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:
```bash
# 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:
```bash
# Web
yarn workspace web build
# Server
yarn workspace server build
```
Start the production servers:
```bash
# Web
yarn workspace web start
# Server
yarn workspace server start
```