moved stringtobool
| @@ -68,6 +68,7 @@ import { | ||
| 68 | 68 | forwardFetchResponse, |
| 69 | 69 | removeColorFormatting, |
| 70 | 70 | getSeparator, |
| 71 | + stringToBool, | |
| 71 | 72 | } from './src/util.js'; |
| 72 | 73 | import { UPLOADS_DIRECTORY } from './src/constants.js'; |
| 73 | 74 | import { ensureThumbnailCache } from './src/endpoints/thumbnails.js'; |
| @@ -244,11 +245,6 @@ app.use(helmet({ | ||
| 244 | 245 | app.use(compression()); |
| 245 | 246 | app.use(responseTime()); |
| 246 | 247 | |
| 247 | -function stringToBool(str) { | |
| 248 | - if (str === 'true') return true; | |
| 249 | - if (str === 'false') return false; | |
| 250 | - return str; | |
| 251 | -} | |
| 252 | 248 | |
| 253 | 249 | const server_port = cliArguments.port ?? process.env.SILLY_TAVERN_PORT ?? getConfigValue('port', DEFAULT_PORT); |
| 254 | 250 | const autorun = (cliArguments.autorun ?? getConfigValue('autorun', DEFAULT_AUTORUN)) && !cliArguments.ssl; |