简体   繁体   English

Google Cloud作为node.js的服务器

[英]Google Cloud as server for node.js

I want to create a node.js with express application that can host multiple clients with different domain names. 我想创建一个具有Express应用程序的node.js,该应用程序可以托管具有不同域名的多个客户端。

I have never created such application, so my question is: 我从未创建过这样的应用程序,所以我的问题是:

If I have a project on my computer and want google (or some other hosting) to run my node application, how do I do it? 如果我的计算机上有一个项目,并且希望google(或其他托管服务)运行我的节点应用程序,该怎么办? Do I need to zip the whole project, and transfer it to the host? 我需要压缩整个项目,然后将其传输到主机吗? If not, how do Google know the front-end and back-end code? 如果不是,Google如何知道前端代码和后端代码?

If you just want to deploy your code, App Engine is the best option for you. 如果您只想部署代码,则App Engine是您的最佳选择。

You can deploy your code there, and Google will manage how many instances will you need. 您可以在此处部署代码,然后Google将管理所需的实例数。 For NodeJS, you can see a quickstart that will show you how to start here . 对于的NodeJS,你可以看到一个快速入门,将告诉你如何开始在这里 You can deploy different services and map those services with different domain names . 您可以部署不同的服务,并使用不同的域名映射这些服务。

There are examples on App Engine if you are using Express , and a tutorial that will show you how to organize your front-end and back-end in App Engine. 如果您使用Express ,则有App Engine上的示例,还有一个教程将向您展示如何在App Engine中组织前端和后端。

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

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