Search code examples
node.jsgoogle-app-enginedockerbottle

Running Bottle (back end) + Nodejs (front end) on Google App Engine


I have my Python/bottle backend running on app engine and decided to use Nodejs/ember for the front end. I haven't used Google Cloud a lot but the Managed VMs beta seems to allow me to deploy my project using Docker.

Question: How do I run both back end and front end on the Google cloud and can I actually run it in the same project? I haven't found any documentation how to do the configuration. I'm sure there is a simple answer that I'm not seeing.


Solution

  • The first thing to consider is that Node.js and Ember.js are separate things. Node.js allows for writing javascript as a server side language. This means that it is used as a webserver (backend) not as client side code (front end). So Node.js would replace your python/bottle. (specially if used with Express.js for middleware).

    Secondly you do not need to host the "frontend" on anything. In most modern web apps the "frontend" is served by your backend (python/bottle) to the user's browser whenever they travel to the web url.

    Because ember has a very full routing system you just have to serve the main index page along with the assets and it will take over the routing for you.

    Finally you can host an python/bottle (backend) Ember.js(front-end) application on google cloud.