docker-lemp-deno/www/deno/server.js

15 lines
350 B
JavaScript
Raw Normal View History

2022-03-27 16:43:46 +00:00
import {opine, serveStatic, json, urlencoded} from "https://deno.land/x/opine@2.0.2/mod.ts";
const server = opine();
server.use(json());
server.use(urlencoded());
server.get("/api/hello", function (req, res) {
res.send("Hello World 5");
});
server.listen(
5000,
() => console.log("server has started on http://localhost:5000 🚀"),
);