diff options
| author | Pitu <[email protected]> | 2020-07-18 16:58:29 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2020-07-18 16:58:29 +0900 |
| commit | bf63bc5e2eb844a771432185e25f8dd6b8360e9f (patch) | |
| tree | aea9a6af34ee2570f876e522e7915c118cc0759f /src | |
| parent | Upgrade migration doc (diff) | |
| download | host.fuwn.me-bf63bc5e2eb844a771432185e25f8dd6b8360e9f.tar.xz host.fuwn.me-bf63bc5e2eb844a771432185e25f8dd6b8360e9f.zip | |
Update setup script
Diffstat (limited to 'src')
| -rw-r--r-- | src/setup.js | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/src/setup.js b/src/setup.js index a02718a..212dd0d 100644 --- a/src/setup.js +++ b/src/setup.js @@ -14,16 +14,11 @@ async function start() { const wizard = [ { type: 'input', - query: 'Port to run the API in:', + query: 'Port to run lolisafe in:', handle: 'SERVER_PORT' }, { type: 'input', - query: 'Port to run the Website in when in dev mode:', - handle: 'WEBSITE_PORT' - }, - { - type: 'input', query: 'Full domain this instance is gonna be running on (Ex: https://lolisafe.moe):', handle: 'DOMAIN' }, @@ -39,13 +34,6 @@ async function start() { }, { type: 'confirm', - query: 'Generate thumbnails for images/videos? (Requires ffmpeg installed and in your PATH)', - handle: 'GENERATE_THUMBNAILS', - accept: 'y', - deny: 'n' - }, - { - type: 'confirm', query: 'Allow users to download entire albums in ZIP format?', handle: 'GENERATE_ZIPS', accept: 'y', @@ -53,31 +41,14 @@ async function start() { }, { type: 'confirm', - query: 'Serve files with node?', - handle: 'SERVE_WITH_NODE', - accept: 'y', - deny: 'n' - }, - { - type: 'input', - query: 'Base number of characters for generated file URLs (12 should be good enough):', - handle: 'GENERATED_FILENAME_LENGTH' - }, - { - type: 'input', - query: 'Base number of characters for generated album URLs (6 should be enough):', - handle: 'GENERATED_ALBUM_LENGTH' - }, - { - type: 'confirm', - query: 'Run lolisafe in public mode? (People will be able to upload without an account)', + query: 'Allow people to upload files without an account?', handle: 'PUBLIC_MODE', accept: 'y', deny: 'n' }, { type: 'confirm', - query: 'Enable user signup for new accounts?', + query: 'Allow people to create new accounts?', handle: 'USER_ACCOUNTS', accept: 'y', deny: 'n' @@ -129,6 +100,11 @@ async function start() { let envfile = ''; const defaultSettings = { + GENERATED_FILENAME_LENGTH: 12, + GENERATED_ALBUM_LENGTH: 6, + WEBSITE_PORT: 5001, + SERVE_WITH_NODE: true, + GENERATE_THUMBNAILS: true, CHUNK_SIZE: 90, ROUTE_PREFIX: '/api', RATE_LIMIT_WINDOW: 2, |