Home > Web Front-end > JS Tutorial > body text

How to deploy Node.JS to Heroku

php中世界最好的语言
Release: 2018-03-16 14:24:05
Original
1691 people have browsed it

This time I will bring you how to deploy Node.JS to Heroku and what are the precautions for deploying Node.JS to Heroku. The following is a practical case. , let’s take a look.

Heroku is a cloud platform that provides rapid deployment services. It supports Node, Ruby, Java, PHP, Python, and Go multiple languages. I tried it today and it’s really cool. Here is a brief introduction.

First of all, you still need to register an account: https://signup.heroku.com/login

I don’t know why, the 163 email address cannot be passed here, but qq can. Then select the language Node.js.

After successful registration, activate your email and fill in your password.

1. Create an app

After successful login, enter the panel and create an application

The name is optional

2. Connect to github

After the creation is successful, enter the deployment page of the app. Three deployment methods are provided, Heroku Git, Github and Dropbox.

The default is HeroGit method, here we choose Github method. After github authorization, you can query your own project below . Here select getting-mean

## If there is no git project for node, fork one to play with. https://github.com/stoneniqiu/getting-MEAN/branches/stale

3. Release

After the connection is successful, you can choose automatic deployment and the branch to be deployed.

# Select master here. After successful deployment, the following interface will appear. Click View to access.

#The page opens as follows. The domain name is also very regular. Isn’t it great?

If you want to delete the application, go to the Settings column. The free space is 300M.

Summary: This article is just a brief introduction. Not counting registration, you can complete the deployment of a node project in three steps. Compared with using virtual machines or cloud methods, Heroku combines code hosting and deployment. , and different branches can be deployed, which is very convenient. FTP code transfer and remote deployment on cloud computing are cumbersome. Heroku's approach is worth trying.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

Nodejs form verification and image upload

Nodejs uses Angular to create a single-page application

The above is the detailed content of How to deploy Node.JS to Heroku. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template