Home > Back-end >  Python Node.js on GAE
Python Node.js on GAE

Time:09-17

I have a Django application deployed on Google App Engine standard environment. I am interested in server side rendering of my JS frontend. Can I use node.js alongside Django on the same GAE? Maybe as microservice?

CodePudding user response:

What you can do is to deploy each of your app as a separate service in App Engine and they will work independently as a microservice. To do so, make sure to set a service name for each of the app.yaml file of your apps:

service: service-name

Afterwards, you can communicate between your services through an HTTP invocation, such as a user request or a RESTful API call. Code in one service can't directly call code in another service.

Refer to this link for additional information about communicating between your services.

CodePudding user response:

I have come across articles that talk about integrating python and Node but I personally haven't done it or seen it done on GAE.

If I were to take a stab, I think you would be looking at something like

  1. Have the python app as a service (say it's available on python_service.myapp.appspot.com
  2. Have your Node.js as your default service available on myapp.appspot.com
  3. Your Nodejs will have a route and when this route is invoked, you make an http request to the python service, wait for a response and then your Nodejs app returns that response.

Our App, https://nocommandline.com is an Electron App (combo of Node.js & Vue.js) If you purchase a license and try to validate it, we make a call server side and our server side is Python based. It's not exactly the same thing you're looking at (since our App is not web-based) but this gives you an idea of what I was trying to describe.

  • Related