简体   繁体   English

在远程服务器上创建Node.js网站

[英]Create Node.js Website on remote server

I'm new to Node.js and I've been going through some tutorials. 我是Node.js的新手,并且正在阅读一些教程。 I've been able to make a simple web page in Node.js and run it as its own server from the command line on my desk top. 我已经能够在Node.js中创建一个简单的网页,并通过我桌面上的命令行将其作为自己的服务器运行。 However, I would like to create it to use it as a website that others can access, as well. 但是,我想创建它以将其用作其他人也可以访问的网站。 Therefore I was wondering how can I host a web site built with Node.js on a remote server? 因此,我想知道如何在远程服务器上托管使用Node.js构建的网站?

Option 1: 选项1:

If you have public IP then you can host the website on your server 如果您拥有公共IP,则可以在服务器上托管网站

Option 2: 选项2:

Find a service provider who can host your Node.js application. 查找可以托管您的Node.js应用程序的服务提供商。 eg heroku 例如heroku

I would recommend you check out Heroku . 我建议您检查一下Heroku They offer a very simple hosting service at a variety of pricing tiers (including free) with a wide variety of add-ons. 他们提供各种定价等级(包括免费)的简单服务,并提供各种附加组件。 Deployment is as simple as pushing to a remote GitHub repository. 部署就像推送到远程GitHub存储库一样简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM