/where-to-drink

Repository for freeCodeCamp backend certificate

Primary LanguageVueMIT LicenseMIT


今晚哪裡喝

今晚哪裡喝

哪裡有人,我就去哪裡喝🍸

screenshot screenshot

Tech Used

Backend

Frontend

  • Vue - frontend framework
  • Vue router - the official router for Vue.js
  • axios - handling ajax requests

Deployment

  • Amazon EC2 - hosting both frontend & backend of the application
  • MongoDB Atlas - hosting the database
  • NGINX - web server as a reverse proxy

Setup

  1. Clone this repository.
  2. Create the environment files
  • Create .env.dev or .env.prod under server/, 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.localunder client/, sample as below:
VUE_APP_BACKEND_URL=http://localhost:3000/api/
  1. Start the server for development purpose:
cd server && npm run dev
cd client && npm run serve
  1. 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.

License

MIT