Fastify: Fastify inside GCP App Engine Standard

Created on 23 Nov 2018  路  3Comments  路  Source: fastify/fastify

Hello, I have a working application using fastify inside GCP using Docker containers and Flexible environment.

I'm trying to test inside flexible but it doesn't works....
It's a simple application.

const Fastify = require('fastify')
const http = require('http')

const serverFactory = (handler, opts) => {
  const server = http.createServer((req, res) => {
    handler(req, res)
  })

  return server
}

const fastify = Fastify({ serverFactory })

fastify.get('/', (req, reply) => {
  reply.send({ hello: 'world' })
})

fastify.listen(8080)

My app doesn't responds when inside App Engine Standard.
Anyone working in GCP to help me?
Thanks

question

Most helpful comment

I know very little about GCP and Flexible, but if it runs inside docker container I suspect it should be:

fastify.listen(8080, '0.0.0.0')

All 3 comments

I know very little about GCP and Flexible, but if it runs inside docker container I suspect it should be:

fastify.listen(8080, '0.0.0.0')

@lependu awesome my friend! Working with all kind of AppEngine env's now.
Thanks!

I know very little about GCP and Flexible, but if it runs inside docker container I suspect it should be:

fastify.listen(8080, '0.0.0.0')

This saved me! I was using NestJS with Fastify and spent hours on the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zairl23 picture zairl23  路  3Comments

kojilab picture kojilab  路  3Comments

zhaoyao91 picture zhaoyao91  路  3Comments

allevo picture allevo  路  3Comments

mcollina picture mcollina  路  4Comments