Created
April 12, 2022 09:46
-
-
Save mcollina/06b6a1bb838b85824102d22b7c3570a2 to your computer and use it in GitHub Desktop.
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
import Fastify from 'fastify' | |
const app = Fastify({ logger: true }) | |
app.get('/', async (request, reply) => { | |
setImmediate(() => { | |
reply.send({ hello: 'world' }) | |
}) | |
// return reply is needed to tell Fastify we will call | |
// reply.send() in the future. | |
return reply | |
}) | |
await app.listen({ port: 3000 }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What about point-of-view, will it be:
like this?