[Vuejs]-Deploy Nuxt.js to Google App Engine Return 502 Bad Gateway

0👍

Below worked for me.

package.json

"start": "npm install --save cross-env && nuxt build && cross-env NODE_ENV=production node server/index.js",

This install cross-env before serving and nuxt build is a required command in production.

Plus I’ve changes in server.js

Add health route to express:

  app.get('/_ah/health', (req, res) => {
    res.status(200)
    res.send({hello:'world'})
  })

Listen to only port

// app.listen(host,port) 
app.listen(port)
👤npr

Leave a comment