Deploying Sails.js to Google Cloud

In this article, I show you how to deploy a Sails.js application to Google Cloud.

Prepare Sails.js

Configure config/env/development.js to port 8080.

module.exports = {

  port: 8080


Deploy using gcloud

Create an account at

Then create a new project. Note the PROJECT ID. You'll need it in bit.

Install the Google Cloud SDK (gcloud).

brew cask install google-cloud-sdk

Authorize it.

gcloud auth login

And finally deploy.

gcloud preview app deploy --project YOUR-PROJECT-ID

That's it! You just deployed your first application to Google Cloud.

Tail the logs

Watch the logs of your application with this command:

gcloud preview app logs read --project YOUR-PROJECT-ID