AzeA
Denoβ€’16mo agoβ€’
5 replies
Aze

Missing express types

Hey, I'm trying to use deno 1.46.3 with express + @types/express, but it seems the types aren't being applied

What can I do?
// @deno-types="@types/express"
import express from "express";

const app = express();
const port = Deno.env.get("APP_PORT") || 3000;

app.get("/:name", (request, response) => {
  const name: string = request.params.name;
  response.send("Hello " + name);
});

if (import.meta.main) {
  app.listen(port, () => 
    console.log(`Listening on :${port}`)
  );
}
image.png
Was this page helpful?