chore(server): display startup info right at the beginning

This commit is contained in:
Elian Doran 2025-09-12 12:36:59 +03:00
parent 2f6d81ce2c
commit fc78f68fa7
No known key found for this signature in database

View File

@ -24,6 +24,8 @@ const LOGO = `\
`;
export default async function startTriliumServer() {
await displayStartupMessage();
// setup basic error handling even before requiring dependencies, since those can produce errors as well
process.on("unhandledRejection", (error: Error) => {
// this makes sure that stacktrace of failed promise is printed out
@ -71,8 +73,6 @@ export default async function startTriliumServer() {
(await import("electron")).app.requestSingleInstanceLock();
}
await displayStartupMessage();
const httpServer = startHttpServer(app);
const sessionParser = (await import("./routes/session_parser.js")).default;