Fix first run initialization

This commit is contained in:
Cohee 2023-08-31 00:40:03 +03:00
parent fcfd8b8a53
commit 7cb896ddd7
1 changed files with 3 additions and 2 deletions

View File

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