This repository has been archived on 2022-06-19. You can view files and clone it, but cannot push or open issues or pull requests.
ContainerImage.WendyUI/Fastify/server.js
djpbessems c5013ab3fd
All checks were successful
continuous-integration/drone/push Build is passing
Fix Fastify port
2022-01-20 15:43:22 +01:00

19 lines
370 B
JavaScript

// Require the framework and instantiate it
const fastify = require('fastify')({ logger: true })
// Declare a route
fastify.get('/', async (request, reply) => {
return { hello: 'world' }
})
// Run the server!
const start = async () => {
try {
await fastify.listen(3001, '0.0.0.0')
} catch (err) {
fastify.log.error(err)
process.exit(1)
}
}
start()