Here are the steps to deploying the AngularJS shopping application to Heroku:
1. Find out the node and npm version you have installed on your machine by typing in the following command
node --version
npm --version
the version you have installed on your machine is probably different
2. Now open the package.json file and add the lines in bold the "engines" section, which tells Heroku that our application is a Node application in the path C:\Program Files\heroku\client
{
"name": "bankapp",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"engines": {
"node": ">=10.14.1",
"npm":">=6.4.1"
},
"dependencies": {
"body-parser": "~1.16.0",
"cookie-parser": "~1.4.3",
"debug": "~2.6.0",
"express": "~4.14.1",
"jade": "~1.11.0",
"morgan": "~1.7.0",
"serve-favicon": "~2.3.2"
}
}
3. We can now create the Procfile to tell Heroku how to start the application, the Procfile type in the line
web: npm start
Don't type anything else. Your application folder should look like the following now
You should see the same thing on your browser
Posts In The AngularJS SPA Application Series:
- Setting Up Angular-Seed
- Preparing Angular-Seed For The Shopping List Application
- Refactor Code to Not Use Global Variables (Shopping List App)
- Installing MongoDB
- Create a MongoDB Configuration FIle
- Install mongoDB as a Windows Service
- Installing Express generator
- Installing ExpressJS Application Server
- Creating The SPA Project Folder Structure
- Setup Express To Serve Static Files
- Setup The Shopping Application For Heroku And Testing It Locally
- Deploy Shopping List Application To Heroku
- Install RoboMongo GUI for MongoDB
Liên hệ Aivivu, đặt vé máy bay tham khảo
ReplyDeleteVe may bay di My
vé máy bay từ mỹ về việt nam hãng korea
các chuyến bay sang nhật có bị cấm không
vé máy bay từ đức về việt nam
giá vé máy bay từ Vancouver về việt nam
Có chuyến bay từ Hàn Quốc về Việt Nam không
vé máy bay cho chuyên gia nước ngoài