Worklog for task "Work out a fast project startup"

10 авг. 2026 г., 09:33:43

On vietnamguru I did this:

--- a/server/index.ts
+++ b/server/index.ts
@@ -49,11 +49,12 @@ async function startServer() {
   stopGraphql = stop
 
   if (withN8N) {
-    // Start n8n as child process (waits for API to be ready)
-    await initN8n()
-
-    // Run bootstrap (create owner, import credentials if needed)
-    await runBootstrap()
+    // Start n8n as child process in background (non-blocking)
+    initN8n()
+      .then(() => runBootstrap())
+      .catch((err) => {
+        console.error('[n8n] Failed to initialize:', err)
+      })
   }
 

True, there is a downside here - if n8n crashes, the server won't restart. But we can live with that since fast startup is a higher priority. Otherwise, during those 10-15 seconds of downtime, search engines manage to crawl and then complain about a 502 error.

21.06.2026