text: const fastify = require('fastify')()
  
  fastify.register(require('fastify-postgres'), {})
  
  fastify.get('/', (req, reply) => {
    fastify.pg.connect(onConnect)
  
    function onConnect (err, client, release) {
      if (err) return reply.send(err)
  
      client.query(
        'SELECT NOW()', [],
        function onResult (err, result) {
          release()
          reply.send(err || result)
        }
      )
    }
  })
  
  fastify.listen(3000, '0.0.0.0', err => {
    if (err) throw err
    console.log(`server listening on ${fastify.server.address().port}`)
  })