config.sample.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. maxSize: '512MB',
  32. // The length of the random generated name for the uploaded files
  33. fileLength: 32,
  34. // NOTE: Thumbnails are only for the admin panel and they require you
  35. // to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
  36. // for images and FFmpeg (https://ffmpeg.org/) for video files
  37. generateThumbnails: false
  38. },
  39. // Folder where to store logs
  40. logsFolder: 'logs',
  41. // The following values shouldn't be touched
  42. database: {
  43. client: 'sqlite3',
  44. connection: {
  45. filename: './database/db'
  46. },
  47. useNullAsDefault: true
  48. }
  49. }