Posts

MEAN stack programming with heroku

Image
Node programming referring to https://www.heroku.com/home . Partial modification of package.json If you check the url created at heroku create, the web is created! Next, try this one  using mongo-db. Using mlab, it is necessary to have a credit card registration on heroku. So refering this https://www.webprofessional.jp/building-facebook-chat-bot-node-heroku/ (in the middle of "How to set the database from mLab's site" or https://www.youtube.com/watch?v=cBfcbb07Tqk ), I linked Heroku to mlab.com. Process.env.mongodb_uri appears in server.js, but this mongodb_uri seems to be already defined as an environment variable of heroku, so I registered this uri created by mlab to heroku.com.  Drop the above sample application https://github.com/chrisckchang/mean-contactlist-angular2 (https://devcenter.heroku.com/articles/mean-apps-restful-api ) locally with git clone. Remove the app.json because the above app assumes the mlab add-on. (App.json seems to be necessary when using herok