Recv/config.defaults.js

79 lines
1.7 KiB
JavaScript
Raw Normal View History

2018-03-19 06:48:05 +00:00
const path = require('path');
const ExpirationUnits = require('./lib/expirationunits');
2018-03-19 06:48:05 +00:00
/*
Copy this file and rename it to 'config.js' to customize the configuration.
This will ensure your changes are not overwritten during updates.
Any settings not configured in your own 'config.js' will use the default
defined in 'config.defaults.js'.
*/
2018-03-19 06:48:05 +00:00
module.exports = {
port: 3000,
nodeModulesPath: path.join(__dirname, 'node_modules'),
2018-03-20 16:22:56 +00:00
database: {
path: path.join(__dirname, 'data'),
autocompactionInterval: 60000
},
fileUpload: {
path: path.join(__dirname, 'data', 'files'),
url: '/files'
},
2018-03-19 06:48:05 +00:00
jwtSecret: 'change me to a random generated string',
code: {
// Use https://alex7kom.github.io/nano-nanoid-cc/ to check for the chance of collisions.
// If a collision occurs, a new code will be generated and tested again for up to 100 times.
alphabet: '1234567890abcdef',
length: 8,
defaultExpiration: null,
maxExpiration: null
/*
To set a maximum expiration of 7 days:
maxExpiration: {
units: ExpirationUnits.Days,
value: 7
}
defaultExpiration follows the same format
*/
2018-04-28 13:00:30 +00:00
},
// How often codes and uploads are checked for expiration and deleted
cleanupInterval: 300,
2018-04-28 13:00:30 +00:00
notifications: {
// How often the notification queue is flushed, in seconds
2018-04-28 13:00:30 +00:00
interval: 10,
2018-04-28 13:00:30 +00:00
maxAttempt: 12,
adminUrl: 'http://localhost:3001/admin/',
mail: {
from: '"Recv" <recv@localhost>',
transport: {
// passed directly to NodeMailer's createTransport. See nodemailer.com for more information.
host: 'smtp.ethereal.email',
port: 587,
secure: false,
auth: {
user: 'recv',
pass: 'test'
}
}
}
}
2018-03-19 06:48:05 +00:00
};