Skip to content

Instantly share code, notes, and snippets.

@evanshortiss
Created May 28, 2019 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evanshortiss/80e609251be8663855c2c24c0394ce04 to your computer and use it in GitHub Desktop.
Save evanshortiss/80e609251be8663855c2c24c0394ce04 to your computer and use it in GitHub Desktop.
Fastify Hello World
const fastify = require('fastify')({
logger: false
})
// Declare a route
fastify.get('/hello', (request, reply) => {
reply.send('hello')
})
// Run the server!
fastify.listen(8080, '0.0.0.0', (err, address) => {
if (err) throw err
fastify.log.info(`server listening on ${address}`)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment