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";
|
2023-09-24 12:05:28 +00:00
|
|
|
import { runAllTasks } from "./app/mod.ts";
|
2023-10-13 16:10:16 +00:00
|
|
|
import { runBot } from "./bot/mod.ts";
|
2023-09-24 12:05:28 +00:00
|
|
|
|
2023-09-26 10:43:36 +00:00
|
|
|
// setup logging
|
2023-09-24 13:08:35 +00:00
|
|
|
setup({
|
2023-09-07 20:43:40 +00:00
|
|
|
handlers: {
|
2023-10-05 09:00:51 +00:00
|
|
|
console: new ConsoleHandler("INFO"),
|
2023-09-07 20:43:40 +00:00
|
|
|
},
|
|
|
|
loggers: {
|
2023-10-05 09:00:51 +00:00
|
|
|
default: { level: "INFO", handlers: ["console"] },
|
2023-09-07 20:43:40 +00:00
|
|
|
},
|
|
|
|
});
|
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([
|
2023-10-13 16:10:16 +00:00
|
|
|
runBot(),
|
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
|
|
|
]);
|