webzone/server.ts
Sam Therapy a86ae17058
All checks were successful
continuous-integration/drone/push Build is passing
Deno deploy does not support import maps????????
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-04 16:33:05 -06:00

22 lines
498 B
TypeScript

import Server from "https://deno.land/x/lume@v1.15.2/core/server.ts"
import expires from "https://deno.land/x/lume@v1.15.2/middlewares/expires.ts"
import not_found from "https://deno.land/x/lume@v1.15.2/middlewares/not_found.ts"
const port = 8000
const server = new Server({
port: port,
root: `${Deno.cwd()}/dist`,
})
server.use(expires())
server.use(not_found({
root: `${Deno.cwd()}/dist`,
page404: "404.html",
}))
server.start()
console.log(`Listening on http://localhost:${port}`)