- Express - web framework for Node.js
- mongoose - ODM for MongoDB
- Passport - authentication middleware for Node.js
- GitHub OAuth - signing in with GitHub accounts
- Amazon EC2 - hosting both frontend & backend of the application
- MongoDB Atlas - hosting the database
- NGINX - web server as a reverse proxy
- Clone this repository.
- Create .env files,
.envs/prod.env
for production and.envs/dev.env
for development. Sample as below:
PORT=3000
MONGODB_URL=mongodb://localhost:27017/book-exchange
GITHUB_CLIENT_ID=<your github client id>
GITHUB_CLIENT_SECRET=<your github client secret>
SESSION_SECRET=secret
FRONTEND_URL=http://localhost:8080
BACKEND_URL=http://localhost:3000
- Start the server:
- For development:
npm run dev
- For production:
npm run start
- See this repo for the frontend of this application.
MIT