swc/crates/swc_bundler/tests/fixture/deno-8545/simplified-1/output/entry.inlined.ts
2021-11-09 20:42:49 +09:00

17 lines
385 B
TypeScript

class Application {
}
class Router {
}
const app = new Application();
const router = new Router();
router.get("/", (ctx)=>{
ctx.response.body = "Index Page";
});
router.get("/users", (ctx)=>{
ctx.response.body = "Users Page";
});
app.use(router.routes());
app.use(router.allowedMethods());
console.log(`Now listening on http://0.0.0.0:3000`);
await app.listen("0.0.0.0:3000");