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: