make route automatic add the sub routes

This commit is contained in:
rafiarrafif
2025-05-06 15:07:21 +07:00
parent b554ff0e5b
commit a5153f0786
6 changed files with 46 additions and 6 deletions

View File

@ -1,6 +1,7 @@
import { Elysia } from "elysia";
import { routes } from "./routes";
const app = new Elysia().get("/", () => "Hello Elysia").listen(3000);
const app = new Elysia().use(routes).listen(3200);
console.log(
`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`