-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOday.js
More file actions
30 lines (21 loc) · 737 Bytes
/
Oday.js
File metadata and controls
30 lines (21 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { opine, serveStatic } from "https://deno.land/x/opine@2.2.0/mod.ts";
import { BuildDataModal } from "./helpers/Helpers.js";
import { AboutShow } from "./controllers/About.js";
import { HomeShow } from "./controllers/Home.js";
import { DenoInfoShow } from "./controllers/Deno.js";
await BuildDataModal();
const server = opine();
server.use(serveStatic("public"));
server.get("/", async (request, response) => {
response.body = await HomeShow();
response.send();
});
server.get("/about", async (request, response) => {
response.body = await AboutShow();
response.send();
});
server.get("/denoInfo", async (request, response) => {
response.body = await DenoInfoShow();
response.send();
});
server.listen(3000);