How to Deploy your project
We are going to use HerokuApp and Zeit (Vercel) for this.
Pre-requirements
Install GIT and the Heroku CLI , Create an account in Zeit
We are going to deploy our Backend in Heroku and Frontend in Zeit.
Let’s first deploy our backend to Heroku
cd backend
git init
git add -A
git commit -m “Pushing to Heroku”
Now lets Create HEROKU REMOTE
heroku create yourappname
heroku git:remote -a yourappname
Deploying code to Heroku
git push heroku master
Thats All, We have deployed our backend to heroku. Your url will look like this
https://yourappname.herokuapp.com
Now let’s see how to deploy our FrontEnd
Now we have to replace our end points with the herokuapp url.
For Example
Earlier endpoint : http://localhost:5000/productsReplace HerokuApp: https://yourappname.herokuapp.com/products
Replace each and every localhost endpoint with herokuapp in Frontend.
Go to Zeit, After creating account in Zeit
Click on Import Project-> Choose Git Repository->Clone URL of the project
Click Deploy.
That’s all you have deployed your project.