satyarohith / sift

Sift is a routing and utility library for Deno Deploy.
https://deno.land/x/sift
MIT License
170 stars 14 forks source link

Use standard modules HTTP server #37

Closed satyarohith closed 3 years ago

satyarohith commented 3 years ago

We currently use addEventListener("fetch", ...) to handle requests and it requires deployctl. And Sift apps can't be run using Deno CLI. We can move to use the server from standard modules which is supported on Deno Deploy. This will enable us to support both Deno and Deploy.

Example usage of the API from docs:

import { listenAndServe } from "https://deno.land/std@0.110.0/http/server.ts";

listenAndServe(":8000", () => new Response("Hello World\n"));

console.log("http://localhost:8000/");
satyarohith commented 3 years ago

Closed by #41