Files
bun.sh/bench/snippets/fastify.mjs
2024-10-06 07:11:18 -07:00

21 lines
321 B
JavaScript

import Fastify from "fastify";
const fastify = Fastify({
logger: false,
});
fastify.get("/", async (request, reply) => {
return { hello: "world" };
});
const start = async () => {
try {
await fastify.listen({ port: 3000 });
} catch (err) {
fastify.log.error(err);
process.exit(1);
}
};
start();