mod.ts 448 B

123456789101112
  1. import app from "./app.ts";
  2. // Get the PORT from the environment variables and store in Opine.
  3. const port = parseInt(Deno.env.get("PORT") ?? "3005");
  4. app.set("port", port);
  5. // Get the DENO_ENV from the environment variables and store in Opine.
  6. const env = Deno.env.get("DENO_ENV") ?? "development";
  7. app.set("env", env);
  8. // Start our Opine server on the provided or default port.
  9. app.listen(port, () => console.log(`listening on port ${port}`));