tambahan
This commit is contained in:
@@ -11,6 +11,7 @@ import UserRoute from "./server/routes/user_route";
|
|||||||
import LayananRoute from "./server/routes/layanan_route";
|
import LayananRoute from "./server/routes/layanan_route";
|
||||||
import AduanRoute from "./server/routes/aduan_route";
|
import AduanRoute from "./server/routes/aduan_route";
|
||||||
import MCPRoute from "./server/routes/mcp_route";
|
import MCPRoute from "./server/routes/mcp_route";
|
||||||
|
import { cors } from "@elysiajs/cors";
|
||||||
|
|
||||||
const Docs = new Elysia({
|
const Docs = new Elysia({
|
||||||
tags: ["docs"],
|
tags: ["docs"],
|
||||||
@@ -33,6 +34,7 @@ const Api = new Elysia({
|
|||||||
.use(AduanRoute);
|
.use(AduanRoute);
|
||||||
|
|
||||||
const app = new Elysia()
|
const app = new Elysia()
|
||||||
|
.use(cors())
|
||||||
.use(Api)
|
.use(Api)
|
||||||
.use(Docs)
|
.use(Docs)
|
||||||
.use(Auth)
|
.use(Auth)
|
||||||
@@ -50,7 +52,7 @@ const app = new Elysia()
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.use(MCPRoute)
|
.use(MCPRoute)
|
||||||
.get("/*", html)
|
// .get("/*", html)
|
||||||
.listen(3000, () => {
|
.listen(3000, () => {
|
||||||
console.log("Server running at http://localhost:3000");
|
console.log("Server running at http://localhost:3000");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user