config.sample.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. // The registered domain where you will be serving the app. Use IP if none.
  12. domains: [
  13. /*
  14. You need to specify the base domain where loli-self is running
  15. and how should it resolve the URL for uploaded files. For example:
  16. */
  17. // Files will be served at http(s)://i.kanacchi.moe/Fxt0.png
  18. { host: 'kanacchi.moe', resolve: 'https://i.kanacchi.moe'},
  19. // Files will be served at https://my.kanacchi.moe/loli-self/files/Fxt0.png
  20. { host: 'kanacchi.moe', resolve: 'https://my.kanacchi.moe/loli-self/files' }
  21. ],
  22. // Port on which to run the server
  23. port: 9999,
  24. // Pages to process for the frontend
  25. pages: ['home', 'auth', 'dashboard', 'faq'],
  26. // Uploads config
  27. uploads: {
  28. // Folder where images should be stored
  29. folder: 'uploads',
  30. // Max file size allowed. Needs to be in MB
  31. // Note: When maxSize is greater than 1 MiB,
  32. // you must set the client_max_body_size
  33. // to the same as maxSize.
  34. maxSize: '512MB',
  35. // The length of the random generated name for the uploaded files
  36. fileLength: 32,
  37. // NOTE: Thumbnails are only for the admin panel and they require you
  38. // to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
  39. // for images and FFmpeg (https://ffmpeg.org/) for video files
  40. generateThumbnails: false
  41. },
  42. // Folder where to store logs
  43. logsFolder: 'logs',
  44. // The following values shouldn't be touched
  45. database: {
  46. client: 'sqlite3',
  47. connection: {
  48. filename: './database/db'
  49. },
  50. useNullAsDefault: true
  51. }
  52. }