run-geddyjs-on-google-app-engine
Learn how to deploy a Sails.js app to Google App Engine flexible environment.

Geddy.js

​Geddy is a simple, structured web framework for Node.js
You can check out Node.js and Google Cloud to get an overview of Node.js itself and learn ways to run Node.js apps on Google Cloud.

Prerequisites

    1.
    Create a project in the Cloud Console.
    2.
    Enable billing for your project.
    3.
    Install the Cloud SDK.

Prepare

    1.
    Install the Geddy.js CLI tool:
    1
    npm install -g geddy
    Copied!
    2.
    Create a new Geddy.js project (this may take a moment):
    1
    geddy gen app testProject
    Copied!
    3.
    Change directory into the new project:
    1
    cd testProject
    Copied!

Run

    1.
    Run the app with the following command:
    1
    geddy
    Copied!
    2.
    Visit http://localhost:4000 to see the new project's home page.

Deploy

By default the Geddy.js app will listen on port 4000 in production mode, so it must be updated to listen on the port specified by the PORT environment variable available in the Google App Engine environment.
    1.
    Open config/production.js and change port: 4000 to port: process.env.PORT || 4000.
    2.
    Now run the following command to deploy your app:
    1
    gcloud app deploy
    Copied!
    3.
    Visit http://YOUR_PROJECT_ID.appspot.com to see the deployed app.
Note: When the the Geddy.js app is deployed it will automatically switch to production mode and listen on the correct port.
Last modified 7mo ago