Update setup script

This commit is contained in:
Pitu 2020-07-18 16:58:29 +09:00
parent 37a5a8cce2
commit bf63bc5e2e
1 changed files with 8 additions and 32 deletions

View File

@ -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,