config.sample.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. module.exports = {
  2. /*
  3. If set to true the user will need to specify the auto-generated token
  4. on each API call, meaning random strangers wont be able to use the service
  5. unless they have the token loli-safe provides you with.
  6. If it's set to false, then upload will be public for anyone to use.
  7. */
  8. private: true,
  9. // If true, users will be able to create accounts and access their uploaded files
  10. enableUserAccounts: true,
  11. /*
  12. Here you can decide if you want lolisafe to serve the files or if you prefer doing so via nginx.
  13. The main difference between the two is the ease of use and the chance of analytics in the future.
  14. If you set it to `true`, the uploaded files will be located after the host like:
  15. https://lolisafe.moe/yourFile.jpg
  16. If you set it to `false`, you need to set nginx to directly serve whatever folder it is you are serving your
  17. downloads in. This also gives you the ability to serve them, for example, like this:
  18. https://files.lolisafe.moe/yourFile.jpg
  19. Both cases require you to type the domain where the files will be served on the `domain` key below.
  20. Which one you use is ultimately up to you.
  21. */
  22. serveFilesWithNode: false,
  23. domain: 'https://lolisafe.moe',
  24. // Port on which to run the server
  25. port: 9999,
  26. // Pages to process for the frontend
  27. pages: ['home', 'auth', 'dashboard', 'faq'],
  28. // Add file extensions here which should be blocked
  29. blockedExtensions: [
  30. '.exe',
  31. '.bat',
  32. '.cmd',
  33. '.msi',
  34. '.sh'
  35. ],
  36. // Uploads config
  37. uploads: {
  38. // Folder where images should be stored
  39. folder: 'uploads',
  40. /*
  41. Max file size allowed. Needs to be in MB
  42. Note: When maxSize is greater than 1 MiB, you must set the client_max_body_size to the same as maxSize.
  43. */
  44. maxSize: '512MB',
  45. // The length of the random generated name for the uploaded files
  46. fileLength: 32,
  47. /*
  48. NOTE: Thumbnails are only for the admin panel and they require you
  49. to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
  50. for images and ffmpeg (https://ffmpeg.org/) for video files
  51. */
  52. generateThumbnails: false,
  53. /*
  54. Allows users to download a .zip file of all files in an album.
  55. The file is generated when the user clicks the download button in the view
  56. and is re-used if the album has not changed between download requests
  57. */
  58. generateZips: true
  59. },
  60. // Folder where to store logs
  61. logsFolder: 'logs',
  62. // The following values shouldn't be touched
  63. database: {
  64. client: 'sqlite3',
  65. connection: { filename: './database/db' },
  66. useNullAsDefault: true
  67. }
  68. }