mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
fix example
This commit is contained in:
@@ -23,13 +23,13 @@ Bun.serve({
|
||||
});
|
||||
|
||||
// Start a fast HTTP server from the main file's export
|
||||
export default {
|
||||
fetch(req) {
|
||||
return new Response(
|
||||
`This is another way to start a server!
|
||||
if the main file export default's an object
|
||||
with 'fetch'. Bun automatically calls Bun.serve`
|
||||
);
|
||||
},
|
||||
// so autocomplete & type checking works
|
||||
} as Bun.Serve;
|
||||
// export default {
|
||||
// fetch(req) {
|
||||
// return new Response(
|
||||
// `This is another way to start a server!
|
||||
// if the main file export default's an object
|
||||
// with 'fetch'. Bun automatically calls Bun.serve`
|
||||
// );
|
||||
// },
|
||||
// // so autocomplete & type checking works
|
||||
// } as Bun.Serve;
|
||||
|
||||
Reference in New Issue
Block a user