deno.land / x / abc@v1.3.3 / examples / ultra_cat_app / main.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { Application, path } from "./deps.ts";import userGroup from "./user/group.ts";import catGroup from "./cat/group.ts";import { jsxLoader } from "./jsx_loader.ts";
const app = new Application();app.start({ port: 8080 });
const staticRoot = "./public";
app .get("/", (c) => c.file("./public/index.html")) .static("/", staticRoot, jsxLoader, (n) => (c) => { c.set("realpath", path.join(staticRoot, c.path)); return n(c); });
userGroup(app.group("/user"));catGroup(app.group("/cat"));
console.log(`server listening on http://localhost:8080`);
abc

Version Info

Tagged at
3 years ago