Deploying a Meteor app on Google App Engine
While Meteor recently stopped their free hosting service , Google recently beta released App Engine that supports Node.js . This short article guides you how to deploy a Meteor app on Google App Engine.
Firstly, you need to setup Google Cloud Platform. Please see the quickstart. In short, you create and enable a Cloud Console project, and then download the Google Cloud SDK. This should be fairly easy by following the instruction. In addition, it will be required to activate API Manager at the console if this is your first time.
Secondly, configuring the permission is important. An easy way is to login yourself as an owner by:
Or, you can download key.json of a service account that has a proper permission, and activate it:
gcloud auth activate-service-account --key-file key.json
Finally, initialize gcloud:
In your Meteor project directory, run the following command to build your app:
meteor build .deploy --directory
Then, create `package.json` in .deploy/bundle with the following content:
"start": "node main.js",
"install": "(cd programs/server && npm install)"
You also need to create `app.yaml` in the same directory with the following content:
In .deploy/bundle, run the following command to deploy your app:
gcloud app deploy
That’s it! It takes a while, but when it’s done, you are all set.