-
Notifications
You must be signed in to change notification settings - Fork 0
/
how_to.txt
59 lines (40 loc) · 992 Bytes
/
how_to.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// mongoDB set up
//
//
// heroku server setup
//
https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up
// heroku client
heroku login
// create a heroku app, and push the node.js server code
heroku create gs-heroku-test
git push heroku master
// run one instance
heroku ps:scale web=1
// https://gs-heroku-test.herokuapp.com/ deployed to Heroku
// list your servers
heroku list
=== gjeromesolomon@gmail.com Apps
gs-heroku-test
gs-reactaurant
// to add an existing git repo
heroku git:remote -a gs-reactaurant
// setup server directory
npm init
npm install express --save
npm install body-parser --save
npm install mongodb --save
// to run and test on localhost
node index.js
// then do
http://localhost:3000/hello-world
// connect git to heroku
heroku git:remote -a gs-reactaurant
// push and run a instance
git push heroku master
heroku ps:scale web=1
// to run
https://gs-reactaurant.herokuapp.com/hello-world
// to debug server
heroku logs --tail