Explorar el Código

Обработка ошибок

Book Pauk hace 2 años
padre
commit
55264314b8
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      server/routes.js

+ 3 - 0
server/routes.js

@@ -21,6 +21,9 @@ function initRoutes(app, wss, config) {
         return;
     }
 
+    if (config.mode !== 'omnireader' && config.mode !== 'liberama.top')
+        throw new Error(`Unknown server mode: ${config.mode}`);
+
     initStatic(app, config);
         
     const reader = new ReaderController(config);