Skip to content

yasamnoya/picterest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Book exchange

🖼 Post your Pics, then get everyone's like

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
  • ElephantSQL - hosting the database
  • NGINX - web server as a reverse proxy

Setup

  1. Clone this repository.
  2. Create the environment files
  • Create .env under server/, sample as below:
PORT=3000
FRONTEND_URL=http://localhost:8080
GITHUB_CLIENT_ID=<your githu client id>
GITHUB_CLIENT_SECRET=<your github client secret>
SESSION_SECRET=some_secret

DB_NAME=<your db name>
DB_HOSTNAME=<host of your db>
DB_USERNAME=<db username>
DB_PASSWORD=<db password>
  • Create .env.localunder client/, sample as below:
VUE_APP_BASE_URL=/
VUE_APP_BACKEND_URL=http://localhost:3000/api/
VUE_APP_GITHUB_CLIENT_ID=<your github client id>
  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