mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
moved stringtobool
This commit is contained in:
@@ -68,6 +68,7 @@ import {
|
|||||||
forwardFetchResponse,
|
forwardFetchResponse,
|
||||||
removeColorFormatting,
|
removeColorFormatting,
|
||||||
getSeparator,
|
getSeparator,
|
||||||
|
stringToBool,
|
||||||
} from './src/util.js';
|
} from './src/util.js';
|
||||||
import { UPLOADS_DIRECTORY } from './src/constants.js';
|
import { UPLOADS_DIRECTORY } from './src/constants.js';
|
||||||
import { ensureThumbnailCache } from './src/endpoints/thumbnails.js';
|
import { ensureThumbnailCache } from './src/endpoints/thumbnails.js';
|
||||||
@@ -244,11 +245,6 @@ app.use(helmet({
|
|||||||
app.use(compression());
|
app.use(compression());
|
||||||
app.use(responseTime());
|
app.use(responseTime());
|
||||||
|
|
||||||
function stringToBool(str) {
|
|
||||||
if (str === 'true') return true;
|
|
||||||
if (str === 'false') return false;
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
const server_port = cliArguments.port ?? process.env.SILLY_TAVERN_PORT ?? getConfigValue('port', DEFAULT_PORT);
|
const server_port = cliArguments.port ?? process.env.SILLY_TAVERN_PORT ?? getConfigValue('port', DEFAULT_PORT);
|
||||||
const autorun = (cliArguments.autorun ?? getConfigValue('autorun', DEFAULT_AUTORUN)) && !cliArguments.ssl;
|
const autorun = (cliArguments.autorun ?? getConfigValue('autorun', DEFAULT_AUTORUN)) && !cliArguments.ssl;
|
||||||
|
Reference in New Issue
Block a user