mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Pham Minh Triet <92496972+Nanome203@users.noreply.github.com> Co-authored-by: snwy <snwy@snwy.me> Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com> Co-authored-by: cirospaciari <cirospaciari@users.noreply.github.com> Co-authored-by: Ben Grant <ben@bun.sh>
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();
|