node搭建托管服务器_在哪里托管Node.js应用

node搭建托管服务器

Here is a non-exhaustive list of the options you can explore when you want to deploy your app and make it publicly accessible.

这是一份详尽的选项列表,您可以在要部署应用并使之公开访问时进行探索。

I will list the options from simplest and constrained to more complex and powerful.

我将列出从最简单的约束到更复杂和强大的选项。

最简单的选择:本地隧道 (Simplest option ever: local tunnel)

Even if you have a dynamic IP, or you’re under a NAT, you can deploy your app and serve the requests right from your computer using a local tunnel.

即使您拥有动态IP或处于NAT下,也可以使用本地隧道从您的计算机部署应用程序并处理请求。

This option is suited for some quick testing, demo a product or sharing of an app with a very small group of people.

此选项适用于一些快速测试,演示产品或与极少数人共享应用程序。

A very nice tool for this, available on all platforms, is ngrok.

ngrok是在所有平台上都可用的一个非常好的工具。

Using it, you can just type ngrok PORT and the PORT you want is exposed to the internet. You will get a ngrok.io domain, but with a paid subscription you can get a custom URL as well as more security options (remember that you are opening your machine to the public Internet).

使用它,您只需键入ngrok PORT ,所需的端口就会暴露在Internet上。 您将获得一个ngrok.io域,但是通过付费订阅,您可以获得一个自定义URL以及更多的安全选项(请记住,您正在向公共Internet打开计算机)。

Another service you can use is https://github.com/localtunnel/localtunnel

您可以使用的另一项服务是https://github.com/localtunnel/localtunnel

零配置部署 (Zero configuration deployments)

毛刺 (Glitch)

Glitch is a playground and a way to build your apps faster than ever, and see them live on their own glitch.com subdomain. You cannot currently have a a custom domain, and there are a few restrictions in place, but it’s really great to prototype. It looks fun (and this is a plus), and it’s not a dumbed down environment - you get all the power of Node.js, a CDN, secure storage for credentials, GitHub import/export and much more.

Glitch是一个游乐场,可让您比以往更快地构建应用程序,并在自己的glitch.com子域中看到它们。 您目前不能拥有一个自定义域,并且有一些限制 ,但是对原型来说确实很棒。 它看起来很有趣(这是一个加号),它并不是一个愚蠢的环境-您可以获得Node.js的所有功能, CDN ,用于凭证的安全存储,GitHub导入/导出等等。

Provided by the company behind FogBugz and Trello (and co-creators of Stack Overflow).

由FogBugz和Trello(以及Stack Overflow的共同创建者)背后的公司提供。

I use it a lot for demo purposes.

我经常将其用于演示目的。

码笔 (Codepen)

Codepen is an amazing platform and community. You can create a project with multiple files, and deploy it with a custom domain.

Codepen是一个了不起的平台和社区。 您可以创建包含多个文件的项目,并使用自定义域进行部署。

无服务器 (Serverless)

A way to publish your apps, and have no server at all to manage, is Serverless. Serverless is a paradigm where you publish your apps as functions, and they respond on a network endpoint (also called FAAS - Functions As A Service).

Serverless是一种发布应用程序且完全无需管理服务器的方法 。 无服务器是您将应用程序发布为功能的范例,它们在网络终结点(也称为FAAS-功能即服务)上响应。

To very popular solutions are

到非常流行的解决方案是

They both provide an abstraction layer to publishing on AWS Lambda and other FAAS solutions based on Azure or the Google Cloud offering.

它们都提供了一个抽象层,可以在AWS Lambda和其他基于Azure或Google Cloud产品的FAAS解决方案上发布。

PAAS (PAAS)

PAAS stands for Platform As A Service. These platforms take away a lot of things you should otherwise worry about when deploying your application.

PAAS代表平台即服务。 这些平台消除了许多您在部署应用程序时应担心的事情。

现在时代 (Zeit Now)

Zeit is now called Vercel

Zeit现在称为Vercel

Zeit is an interesting option. You just type now in your terminal, and it takes care of deploying your application. There is a free version with limitations, and the paid version is more powerful. You forget that there’s a server, you just deploy the app.

Zeit是一个有趣的选择。 您now只需在终端中键入内容,它就可以部署您的应用程序。 有一个免费版本有限制,而付费版本则功能更强大。 您会忘记有服务器,而只是部署应用程序。

纳米盒 (Nanobox)

Nanobox

纳米盒

Heroku (Heroku)

Heroku is an amazing platform.

Heroku是一个了不起的平台。

This is a great article on getting started with Node.js on Heroku.

这是一篇关于Heroku上Node.js入门的很棒的文章。

微软Azure (Microsoft Azure)

Azure is the Microsoft Cloud offering.

Azure是Microsoft Cloud产品。

Check out how to create a Node.js web app in Azure.

了解如何在Azure中创建Node.js Web应用程序

Google Cloud Platform (Google Cloud Platform)

Google Cloud is an amazing structure for your apps.

Google Cloud对您的应用程序来说是一种了不起的结构。

They have a good Node.js Documentation Section

他们有一个不错的Node.js文档部分

虚拟专用服务器 (Virtual Private Server)

In this section you find the usual suspects, ordered from more user friendly to less user friendly:

在本部分中,您将找到通常的可疑对象,其顺序从对用户更友好到对用户更不友好:

Since they provide an empty Linux machine on which you can work, there is no specific tutorial for these.

由于它们提供了可以在其上工作的空Linux计算机,因此没有针对它们的特定教程。

There are lots more options in the VPS category, those are just the ones I used and I would recommend.

VPS类别中还有更多选项,这些只是我使用的选项,我会建议您使用。

裸机 (Bare metal)

Another solution is to get a bare metal server, install a Linux distribution, connect it to the internet (or rent one monthly, like you can do using the Vultr Bare Metal service)

另一种解决方案是获得裸机服务器,安装Linux发行版,将其连接到互联网(或每月租用一个服务器,就像使用Vultr Bare Metal服务一样)

翻译自: https://flaviocopes.com/nodejs-hosting/

node搭建托管服务器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值