Use the following steps to deploy this full-stack application.
Setup Database
- Setup mysql server. Once setup, establish new database and user
- Configure database connection: database/setup.sql
- Launch into mysql, then 'use ;' and 'source ./setup.sql'
Setup Backend
- Update config to point to local db: backend/config/database.js
- Update backend API port if necessary (default 5000): backend/index.js
- Run the node in bg (from backend folder) via forever module: ./node_modules/forever/bin/forever start index.js
Primary node modules for backend: mysql, cors, express, forever
Setup Frontend
Note files in this folder are the raw frontend files - this folder is used for development but not production deployment. Latest build has been generated via 'npm run build' and production files can be found in frontend/dist. This node can be deployed to production via:
- On the server where backend node is created, create a new folder (we'll call it frontend-app)
- In new folder, run 'npm init -y'
- In same folder, run 'npm install express forever serve-static path axios core-js vue vue-router vuetify'
- Copy server.js and /dist (the whole folder) from this frontend repo to the new folder (frontend-app)
- Run the node in bg (from frontend-app folder) via forever module: ./node_modules/forever/bin/forever start server.js
Primary node modules for frontend: express, forever, serve-static,path, axios, core-js, vue, veutify, vue-router