Upload a Java and node.js project to Google AppEng

2019-07-13 02:26发布

At first I have a Java-Module set up in AndroidStudio that I upload to my GoogleAppEngine server which works pretty good. (Android Studio - Build -Deploy Module to Google App Engine)

Now I also want to upload an additioanl node.js server to the same App Engine instance. The code shall also access the firebase databases, that were created in the Java module. To uplaod the node.js code I followed Googles QuickStart tutorial using gcloud app deploy.

As I know this creates a new version in the backends flex environment disabling my existing Java Code.

So my questions is: How can I add a node.js server to my existing Instance? I guess I have to do this within the Android Studio project then but not within gcloud app deploy. How can I create a new module such that the node.js server is available on a subfolder then for instance?

1条回答
男人必须洒脱
2楼-- · 2019-07-13 03:04

You won't be able to "upload an additional node.js server to the same App Engine instance" because it's a different language (and environment), thus they can't be in the same service/module (an instance can only execute code from one module).

You need to name the services/modules differently so that they don't overwrite each-other at deployment time. After that they can be deployed independently.

Check your service: configuration in the node.js modules's app.yaml file. From General settings:

service: service_name

Required if creating a service. Optional for the default service. Each service and each version must have a name. A name can contain numbers, letters, and hyphens. It cannot be longer than 63 characters and cannot start or end with a hyphen. Choose a unique name for each service and each version. Don't reuse names between services and versions.

Note: Services were previously called "modules."

And your module and/or service configs in your java module's appengine-web.xml file.

See also Microservices Architecture on Google App Engine

查看更多
登录 后发表回答