Nodejs app on Google Cloud App Engine not starting

oystersauce

Good day,

my very basic Nodejs app is deployed on a Google Cloud App Engine instance is not starting. The app works locally, deployment with app deploy runs without error - and on the app instance the app runs successfully when started manually through Cloud shell (with >npm start). However, as soon as the Cloud Shell is closed my app is dead. What am I missing? How do I start-up the app to run permanently?

The app consists of

  • bot4.js file,
  • npm dependencies
  • app.yaml
  • package.json

app.yaml:

runtime: nodejs8
handlers:
- url: /
  script: auto

package.json:

{
  "name": "blexplorer",
  "version": "1.0.0",
  "description": "",
  "main": "bot4.js",
  "scripts": {
    "start": "node bot4.js"
  },
  "author": "oystersauce",
  "license": "ISC",
  "dependencies": {
    "discord.js": "^11.4.2",
    "request": "^2.88.0"
  }
}

Again, the app is running fine when started through the Cloud Shell but no longer, as soon as the Cloud Shell is closed. Also, it's a super simple discord-bot - hence there is no front-end whatsoever.

EDIT: this is how I thought I started the app manually - but what I did here is starting the app within the cloud shell and not on the app instance: enter image description here

here is how I deploy the app: enter image description here

Dan Cornilescu

From GAE perspective the cloud shell is simply a shell on a "local" development machine which just happens to be hosted in the cloud. The instance running the cloud shell has no special relationship with GAE whatsoever.

What you're doing when running npm start is not actually starting the GAE instance, you're just starting a "local" execution of your service, just like when you'd be doing the same on your local machine.

With your configuration GAE should start your app automatically as soon a request for it is received. On an app with a frontend just clicking on the link you circled in the snapshot would get you on it. Since yours doesn't have a frontend it would probably be just started, but you'd have to rely on the dashboard info and/or your app's logs to confirm it is running.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Starting app engine modules in Google App Engine

From Dev

NodeJs:Unable to connect Google Cloud SQL from Google App Engine

From Dev

Connection timed out: Nodejs Google App Engine to Cloud MySql

From Dev

Google Cloud: Storage and App Engine

From Dev

Google cloud storage with app engine

From Dev

Google App Engine project not starting in Eclipse

From Dev

Google Cloud App Engine Flexible Python 2.7 Env Errors starting new threads

From Dev

Connecting to Google Cloud SQL in Google App Engine

From Dev

Google cloud endpoint on Google app engine

From Dev

NodeJS Forge viewer error on Google App Engine

From Dev

Global variable in Google App engine Nodejs Puppeteer

From

Google App Engine 502 (Bad Gateway) with NodeJS

From Dev

Google App Engine using sockets with NodeJs

From Dev

Not able to run nodejs project on google app engine

From Dev

Google Cloud Build and App Engine enviroment variables

From Dev

google app engine free tier and cloud platform

From Java

Google App Engine Cloud Endpoints userId is null

From Dev

google cloud app engine deploy failed

From Dev

Connecting Google Cloud Memorystore with App Engine service

From Dev

Google App Engine Cloud SQL connection issue

From Dev

Google Cloud Datastore and Flask App Engine

From Dev

Google App Engine Standard Python Cloud Build

From Dev

Google Cloud Datastore requires app engine?

From Dev

Disable default healthcheck on Google Cloud App Engine

From Dev

Google Cloud App Engine - Edit 1 file

From Dev

Use php extensions in Google Cloud App Engine

From Dev

Google Cloud App Engine - Default Storage Buckets

From Dev

Different App Engine Applications in Google Cloud

From Dev

Google Cloud App Engine Flexbile quota error

Related Related

  1. 1

    Starting app engine modules in Google App Engine

  2. 2

    NodeJs:Unable to connect Google Cloud SQL from Google App Engine

  3. 3

    Connection timed out: Nodejs Google App Engine to Cloud MySql

  4. 4

    Google Cloud: Storage and App Engine

  5. 5

    Google cloud storage with app engine

  6. 6

    Google App Engine project not starting in Eclipse

  7. 7

    Google Cloud App Engine Flexible Python 2.7 Env Errors starting new threads

  8. 8

    Connecting to Google Cloud SQL in Google App Engine

  9. 9

    Google cloud endpoint on Google app engine

  10. 10

    NodeJS Forge viewer error on Google App Engine

  11. 11

    Global variable in Google App engine Nodejs Puppeteer

  12. 12

    Google App Engine 502 (Bad Gateway) with NodeJS

  13. 13

    Google App Engine using sockets with NodeJs

  14. 14

    Not able to run nodejs project on google app engine

  15. 15

    Google Cloud Build and App Engine enviroment variables

  16. 16

    google app engine free tier and cloud platform

  17. 17

    Google App Engine Cloud Endpoints userId is null

  18. 18

    google cloud app engine deploy failed

  19. 19

    Connecting Google Cloud Memorystore with App Engine service

  20. 20

    Google App Engine Cloud SQL connection issue

  21. 21

    Google Cloud Datastore and Flask App Engine

  22. 22

    Google App Engine Standard Python Cloud Build

  23. 23

    Google Cloud Datastore requires app engine?

  24. 24

    Disable default healthcheck on Google Cloud App Engine

  25. 25

    Google Cloud App Engine - Edit 1 file

  26. 26

    Use php extensions in Google Cloud App Engine

  27. 27

    Google Cloud App Engine - Default Storage Buckets

  28. 28

    Different App Engine Applications in Google Cloud

  29. 29

    Google Cloud App Engine Flexbile quota error

HotTag

Archive