diff --git a/server.js b/server.js index a97e624d4..fa312caa0 100644 --- a/server.js +++ b/server.js @@ -60,6 +60,9 @@ const { Tokenizer } = require('@agnai/web-tokenizers'); const _ = require('lodash'); const { generateRequestUrl, normaliseResponse } = require('google-translate-api-browser'); +// Create files before running anything else +createDefaultFiles(); + // local library imports const AIHorde = require("./src/horde"); const basicAuthMiddleware = require('./src/middleware/basicAuthMiddleware'); @@ -68,8 +71,6 @@ const contentManager = require('./src/content-manager'); const novelai = require('./src/novelai'); const statsHelpers = require('./statsHelpers.js'); -createDefaultFiles(); - function createDefaultFiles() { const files = { settings: 'public/settings.json',