forked from pinks/eris
1
0
Fork 0
eris/main.ts

24 lines
500 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";
2023-10-05 09:00:51 +00:00
import { serveUi } 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-10-05 09:00:51 +00:00
console: new ConsoleHandler("INFO"),
},
loggers: {
2023-10-05 09:00:51 +00:00
default: { level: "INFO", 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-10-05 09:00:51 +00:00
serveUi(),
2023-09-03 19:06:20 +00:00
]);