简体   繁体   中英

GCP Node.js execute app in separate subfolder

I have a node.js app, i want to execute it in: mydomain.com/myapp, because i have a different web in mydomain.com. in a compute engine instance.

How can I run node.js in a subfolder without damage anything in my main domain?

I've tried in cloud shell, and it's okay. I found in the documentation that the next step I have to do is run:

gcloud app deploy

But I understand that this will make it run on the entire domain.

You can have an HTTPS Load Balancer in the front and route traffic based on paths to the internal resource. For example, '/' (root domain) to the Compute Engine VM and '/something' (some path) to an App Engine service. This could help achieve your use case. I'll add some documents which could help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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