bun fix
This commit is contained in:
parent
59b59a66cf
commit
277e70318d
3 changed files with 10 additions and 3 deletions
10
src/index.ts
10
src/index.ts
|
|
@ -1,7 +1,13 @@
|
|||
import { Elysia } from "elysia";
|
||||
import { staticPlugin } from '@elysiajs/static'
|
||||
|
||||
const app = new Elysia().get("/", () => "Hello Elysia").listen(3000);
|
||||
const app = new Elysia()
|
||||
.use(staticPlugin({
|
||||
assets: "../frontend/", prefix: "/"
|
||||
}))
|
||||
.get("/", () => Bun.file("../frontend/index.html"))
|
||||
.listen(3000);
|
||||
|
||||
console.log(
|
||||
`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
|
||||
`🦊 Elysia is running at http://${app.server?.hostname}:${app.server?.port}`
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue