mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
21 lines
321 B
JavaScript
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();
|