Reference:
[1] Learn The MERN Stack - Frontend Authentication | Redux Toolkit, Traversy Media YT Channel
Node v14 (recommend v14.18.2)
# run on /
npm install
# run on /frontend
cd frontend
npm install
# run on /
npm run server
# run on /
npm run client
# run on /
npm run dev
- Create Heroku App
# install Heroku CLI (if not ready)
sudo snap install heroku --classic
# login to heroku account
heroku login
# create new heroku app
heroku create hagai-mernapp
- On the Heroku Page set env variable on the
Settings/Config Vars
- Link the code to the Heroku App
# the command can be seen in the page under the 'Deploy' section
heroku git:remote -a hagai-mernapp
# push the code
git push heroku main
- The Deployment is finished
# to get the link of the app
heroku open