Heroku is a container-based cloud Platform as a Service (PaaS). Developers use Heroku to deploy, manage, and scale modern apps. Our platform is elegant, flexible, and easy to use, offering developers the simplest path to getting their apps to market.
-
Put the
/updates
folder out of the/server
-
Put the
package.json
,.gitignore
andindex.js
out of the/server
folder -
In the
/server
folder leeve only themodels
androutes
folder -
Inside the
.gitignore
remove the/public
line -
On the
index.js
file change file inports- models import
- routes require
-
Create the
/public
file- Go to the the client and run
npm run build
oryarn build
, this comand will create a/build
folder inside the/client
- Muve the
/build
folder outside theclient
folder - Change the
/build
folder name topublic
- Go to the the client and run
-
Create the start script
- Go to the
package.json
- Add
"start": "npm install && node index.js"
tho the"scripts"
- Go to the
-
If you don't have one, create a heroku account
-
After login create a new app
-
Choose the GitHub Deployment method
-
Conect to the github account and repo
-
Choose the branch who will be deployed end eneble the Automatic Deploys
-
Before you deploy the aplication go to the settings section and set the environment variables
- Go to de settings session
- On Config Vars click on Reveal Config Vars and set the variables
-
On deploy section click on deploy branch