From 2d06d918a154c15196ca92fb8f7873ca3c797f00 Mon Sep 17 00:00:00 2001 From: Pitu Date: Sat, 18 Jul 2020 02:21:31 +0900 Subject: Timeout, package and docs cleanup --- src/setup.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/setup.js') diff --git a/src/setup.js b/src/setup.js index 080320f..a02718a 100644 --- a/src/setup.js +++ b/src/setup.js @@ -155,8 +155,6 @@ async function start() { console.log('============================================='); console.log('== .env file generated successfully. =='); console.log('============================================='); - console.log('== Run `yarn migrate` and `yarn seed` next =='); - console.log('============================================='); console.log(); } -- cgit v1.2.3 From bf63bc5e2eb844a771432185e25f8dd6b8360e9f Mon Sep 17 00:00:00 2001 From: Pitu Date: Sat, 18 Jul 2020 16:58:29 +0900 Subject: Update setup script --- src/setup.js | 40 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) (limited to 'src/setup.js') diff --git a/src/setup.js b/src/setup.js index a02718a..212dd0d 100644 --- a/src/setup.js +++ b/src/setup.js @@ -14,14 +14,9 @@ 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):', @@ -37,13 +32,6 @@ async function start() { query: 'Maximum allowed upload file size in MB (Ex: 100):', handle: 'MAX_SIZE' }, - { - 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?', @@ -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, -- cgit v1.2.3