#Using express

4 messages · Page 1 of 1 (latest)

void roost
#

I found it : just use

import express from "express";
const app = express();
app.set("etag", false);

app.get("/", function (req, res) {
  res.send("");
});

app.get("/user/:id", function (req, res) {
  res.send(req.params.id);
});

app.post("/user", function (req, res) {
  res.send("");
});

export default { fetch: app.listen }
void roost
#

I have tho

TypeError: Return value from serve handler must be a response or a promise resolving to a response
    at mapped (ext:deno_http/00_serve.ts:409:15)
    at eventLoopTick (ext:core/01_core.js:178:7)
celest venture
#

express with deno works the same way it works everyone else