Skip to content

Commit 5ca0024

Browse files
committed
Video-45-Publish-To-Heroku
1 parent e8db70b commit 5ca0024

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
31
# dependencies
42
node_modules
53
/.pnp

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: node --experimental-modules backend/server.js

README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -324,4 +324,15 @@ $ npm start
324324
3. add order delete action to order list
325325
44. Deliver Order
326326
1. create constant, actions and reducers for deliver order
327-
2. add order deliver action to order details screen
327+
2. add order deliver action to order details screen
328+
45. Publish To Heroku
329+
1. Create git repository
330+
2. Create heroku account
331+
3. install Heroku CLI
332+
4. heroku login
333+
5. heroku apps:create <yourname>amazona
334+
6. Edit package.json for build script
335+
10. Create Procfile
336+
12. Create mongodb atlas database
337+
19. Set database connection in heroku env variables
338+
20. Commit and push

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"description": "Ecommerce website like amazon",
66
"main": "index.js",
77
"scripts": {
8+
"build": "cd frontend && npm install && npm run build",
89
"start": "nodemon --watch backend --exec node --experimental-modules backend/server.js"
910
},
1011
"repository": {
@@ -30,5 +31,7 @@
3031
"eslint": "^7.9.0",
3132
"eslint-plugin-react": "^7.21.2",
3233
"nodemon": "^2.0.4"
33-
}
34+
},
35+
"engines": {"node":"12.4.0", "npm": "6.9.0"}
36+
3437
}

0 commit comments

Comments
 (0)