21 lines
497 B
TypeScript
21 lines
497 B
TypeScript
import { Elysia } from "elysia";
|
|
import { html } from "@elysiajs/html";
|
|
import { staticPlugin } from "@elysiajs/static";
|
|
import { app } from "./app";
|
|
|
|
const index = new Elysia()
|
|
.use(html())
|
|
.use(staticPlugin({
|
|
assets: './src/frontend/public',
|
|
prefix: '/'
|
|
}))
|
|
.use(app)
|
|
.onRequest(({ request }) => {
|
|
console.log(`Request ${request.method} ${request.url}`);
|
|
})
|
|
.listen(3000);
|
|
|
|
console.log(
|
|
`🦊 Elysia is running at ${index.server?.hostname}:${index.server?.port}`
|
|
);
|