Created
May 28, 2019 23:27
-
-
Save evanshortiss/80e609251be8663855c2c24c0394ce04 to your computer and use it in GitHub Desktop.
Fastify Hello World
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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