- Express - web framework for Node.js
- mongoose - ODM for MongoDB
- Passport - authentication middleware for Node.js
- Google OAuth - signing in with Google accounts
- Facebook OAuth - signing in with Facebook accounts
- Vue - frontend framework
- Vue router - the official router for Vue.js
- axios - handling ajax requests
- 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 the environment files
- Create
.env.dev
or.env.prod
underserver/
, sample as below:
PORT=3000
FRONTEND_URL=http://localhost:8080
BACKEND_URL=http://localhost:3000/api
MONGODB_URL=mongodb://localhost:27017/localhost
SESSION_SECRET=DrinkingIsMyLife
YELP_TOKEN=<your yelp api token>
# OAuth
GOOGLE_CLIENT_ID=<your google client id>
GOOGLE_CLIENT_SECRET=<your google client secret>
FACEBOOK_APP_ID=<your facebook app client id>
FACEBOOK_APP_SECRET=<your facebook app client secret>
- Create
.env.local
underclient/
, sample as below:
VUE_APP_BACKEND_URL=http://localhost:3000/api/
- Start the server for development purpose:
cd server && npm run dev
cd client && npm run serve
- Start the server for production:
cd server && npm run start
cd client && npm run build
Then serve the files under ciient/dist/
with a http server, i.e. NGINX.
MIT