-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Description
Deno 2.4.0
Task dev deno run --env=.env.dev --inspect --watch -A main.ts
I get this message in the console, I can't figure out why, I'm running Deno and not Nodejs
server.ts
import { Application } from "jsr:@oak/oak/application";
import { oakCors } from "https://deno.land/x/cors/mod.ts";
const app = new Application();
app.use(
oakCors({
origin: "*",
}),
);
export { app };main.ts
import { importAllFilesFromFolder } from "./importModules.ts";
import { db, init } from "./src/lib/sqlite.ts"; // Import db and init
// Initialize database schema (creates tables if they don't exist)
init(db);
await importAllFilesFromFolder("./src/handlers");
import { globalUnhandledrejection } from "./src/lib/logger.ts";
import { bot } from "./src/lib/tg.ts";
import { app } from "./src/lib/server.ts";
import "./src/lib/cron.ts";
bot.start();
app.listen({ port: 8000 });
globalThis.addEventListener("unhandledrejection", (e) => {
globalUnhandledrejection.error(
"unhandled rejection at:",
e.promise,
);
e.preventDefault();
setTimeout(() => {
Deno.exit(1);
}, 1000);
});zawupf and maujavier91
Metadata
Metadata
Assignees
Labels
No labels