fairyilys@gmail.com@123456
已部署 node 项目: my blog
- Heroku + Node.JS gitbook:https://www.gitbook.com/book/samypesse/heroku-node/details
Install the Heroku CLI
Download and install the Heroku CLI.
If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.
$ heroku login
Create a new Git repository
Initialize a git repository in a new or existing directory
$ cd my-project/
$ git init
$ heroku git:remote -a zhimeng
Deploy your application
Commit your code to the repository and deploy it to Heroku using Git.
$ git add .
$ git commit -am "make it better"
$ git push heroku master
Existing Git repository
For existing repositories, simply add the heroku remote
$ heroku git:remote -a zhimeng
The application is now deployed. Ensure that at least one instance of the app is running:
$ heroku ps:scale web=1
Now visit the app at the URL generated by its app name. As a handy shortcut, you can open the website as follows:
$ heroku open
1. git clone git项目地址
2. cd 项目目录
3. heroku create, 这时候,heroku 会为我们随机取一个应用名字,并提供一个 git 仓库给我们。
4. git remote -v
5. git push heroku master
6. heroku open 打开项目,则 heroku 会自动打开浏览器带我们去到相应的网址