diff options
Diffstat (limited to 'config.sample.js')
| -rw-r--r-- | config.sample.js | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/config.sample.js b/config.sample.js index 5bc76ce..4555f3e 100644 --- a/config.sample.js +++ b/config.sample.js @@ -7,25 +7,25 @@ module.exports = { If it's set to false, then upload will be public for anyone to use. */ private: true, - + // If true, users will be able to create accounts and access their uploaded files enableUserAccounts: true, - - // The registered domain where you will be serving the app. Use IP if none. - domains: [ - - /* - You need to specify the base domain where loli-self is running - and how should it resolve the URL for uploaded files. For example: - */ - // Files will be served at http(s)://i.kanacchi.moe/Fxt0.png - { host: 'kanacchi.moe', resolve: 'https://i.kanacchi.moe'}, + /* + Here you can decide if you want lolisafe to serve the files or if you prefer doing so via nginx. + The main difference between the two is the ease of use and the chance of analytics in the future. + If you set it to `true`, the uploaded files will be located after the host like: + https://lolisafe.moe/yourFile.jpg - // Files will be served at https://my.kanacchi.moe/loli-self/files/Fxt0.png - { host: 'kanacchi.moe', resolve: 'https://my.kanacchi.moe/loli-self/files' } + If you set it to `false`, you need to specify the domain in the setting right below `serveFilesWithNode` + and make nginx directly serve whatever folder it is you are serving your downloads in. This also gives + you the ability to serve them, for example, like this: + https://files.lolisafe.moe/yourFile.jpg - ], + So ultimately, it's up to you. + */ + serveFilesWithNode: false, + domain: '', // Port on which to run the server port: 9999, @@ -48,18 +48,20 @@ module.exports = { // Folder where images should be stored folder: 'uploads', - // Max file size allowed. Needs to be in MB - // Note: When maxSize is greater than 1 MiB, - // you must set the client_max_body_size - // to the same as maxSize. + /* + Max file size allowed. Needs to be in MB + Note: When maxSize is greater than 1 MiB, you must set the client_max_body_size to the same as maxSize. + */ maxSize: '512MB', // The length of the random generated name for the uploaded files fileLength: 32, - // NOTE: Thumbnails are only for the admin panel and they require you - // to install a separate binary called graphicsmagick (http://www.graphicsmagick.org) - // for images and FFmpeg (https://ffmpeg.org/) for video files + /* + NOTE: Thumbnails are only for the admin panel and they require you + to install a separate binary called graphicsmagick (http://www.graphicsmagick.org) + for images and ffmpeg (https://ffmpeg.org/) for video files + */ generateThumbnails: false }, @@ -69,9 +71,7 @@ module.exports = { // The following values shouldn't be touched database: { client: 'sqlite3', - connection: { - filename: './database/db' - }, + connection: { filename: './database/db' }, useNullAsDefault: true } } |