DEV Community

Theresa
Theresa

Posted on

1

Quick Start Tips You Need for Node.js Deployment on App Engine

When trying to deploy your node app on App Engine, you might run into various blockers that can be difficult to diagnose.

Yesterday, my app was receiving 502 and 500 errors, depending on the tweak, and the official Google documentation on App Engine leave the deployment requirements to be desired.

[Here are the official docs on getting you nodejs project deployed on App Engine:

The solution for me, in short, was making sure I had an app.yaml file in the project root, WITH url handlers:

# [START runtime]
runtime: nodejs10
# [END runtime]

# [START handlers]
handlers:
 - url: /
   static_files: build/index.html
   upload: build/index.html

 - url: /(.*)
   static_files: build/\1
   upload: build/(.*)
# [END handlers]
Enter fullscreen mode Exit fullscreen mode

Other things you'll want to check:

  • your app.yaml file is in the root of your project
  • if you're paying, make sure payment is set up
  • make sure you ran npm run build (or equivalent) before gcloud app deploy
  • in start.js (or equivalent), set default port to 8080

Let me know if there are other tips, or outdated information here.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs