eris/main.ts

24 lines
504 B
TypeScript
Raw Normal View History

2023-09-26 10:43:36 +00:00
import "std/dotenv/load.ts";
import { ConsoleHandler } from "std/log/handlers.ts";
import { setup } from "std/log/mod.ts";
import { serveApi } from "./api/mod.ts";
import { runAllTasks } from "./app/mod.ts";
2023-09-24 13:08:35 +00:00
import { bot } from "./bot/mod.ts";
2023-09-26 10:43:36 +00:00
// setup logging
2023-09-24 13:08:35 +00:00
setup({
handlers: {
2023-09-26 10:43:36 +00:00
console: new ConsoleHandler("DEBUG"),
},
loggers: {
2023-09-10 18:56:17 +00:00
default: { level: "DEBUG", handlers: ["console"] },
},
});
2023-09-03 19:06:20 +00:00
2023-09-26 10:43:36 +00:00
// run parts of the app
2023-09-04 16:55:48 +00:00
await Promise.all([
bot.start(),
2023-09-10 18:56:17 +00:00
runAllTasks(),
2023-09-26 10:43:36 +00:00
serveApi(),
2023-09-03 19:06:20 +00:00
]);