Use ExpresJS+ReactJS to make a small project, git push to publish to heroku, it is very convenient to do development testing, the following is the publishing process on ubuntu.
Heroku is a cloud platform service provider (PaaS) that supports multiple programming languages and is used as a web application deployment model. Heroku is one of the earliest cloud platforms. It has been developed since June 2007. At that time, it only supported the Ruby programming language, but now it supports Java, Node.js, Scala, Clojure, Python, PHP and Go. For this reason, Heroku is considered a multilingual platform because it allows developers to build, run, and extend applications in all languages in a similar way.
$ wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
$ express myfirstexpress && cd myfirstexpress
If necessary, modify the dependencies
of package.json
.
Install dependent packages:
$ sudo npm install -l
$ git init
$ git add .
$ git commit -m 'init'
$ heroku create myfirstexpress
$ git push heroku master
Run the service (not needed, my project ran directly after pushing it):
$ heroku ps:scale web=1
Check the running status of the service:
$ heroku ps
If there is an error, look at the log:
$ heroku logs
open to take a look:
$ heroku open
Recommended Posts