You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
507 B

import Server from "https://deno.land/x/lume@v1.13.2/core/server.ts";
import expires from "https://deno.land/x/lume@v1.13.2/middlewares/expires.ts";
import not_found from "https://deno.land/x/lume@v1.13.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}`);