This app would be my starting point of any future apps. App was deployed on Heroku
Steps to start the app:
- Install dependencies
npm install
in root folder - Start development mode of the app
npm run start
App consist of:
Backend:
- NodeJS
- Express
- Mongoose
Database:
- Mongo
Frontend:
- React
- Webpack
- Jest
App was deployed and store in Heroku.
- Deploying automation
- Optimize wepback production config file
- Install deps
npm install
- Restart pm2 process
pm2 start npm --name "backend" -- run start:production
- Make sure you are in
dist
dir. - Transfer files
scp -i ~/.ssh/sshFileName.pem * userName@hostName:~/dirName
- Check
.env
variables on client side - Build client
npm run build
make sure you are in the client directory - Copy builded files to
public
direactory on server and commit changes - Push changes to heroku master
git push heroku master
- Revert
.env
variables on the client side if needed