config.sample.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. // Uploads config
  25. uploads: {
  26. // Folder where images should be stored
  27. folder: 'uploads',
  28. // Max file size allowed. Needs to be in MB
  29. maxSize: '512MB',
  30. // The length of the random generated name for the uploaded files
  31. fileLength: 32,
  32. // NOTE: Thumbnails are only for the admin panel and they require you
  33. // to install a separate binary called graphicsmagick (http://www.graphicsmagick.org)
  34. generateThumbnails: false
  35. },
  36. // Folder where to store logs
  37. logsFolder: 'logs',
  38. // The following values shouldn't be touched
  39. database: {
  40. client: 'sqlite3',
  41. connection: {
  42. filename: './database/db'
  43. },
  44. useNullAsDefault: true
  45. }
  46. }