2025-06-03 12:12:48 +02:00
|
|
|
const { argv } = require('yargs').usage(
|
2021-12-01 11:28:56 +00:00
|
|
|
'Usage: $0 [--port INTEGER [8080]] \
|
|
|
|
[--baseurl STRING ["/"]] \
|
|
|
|
[--redis STRING:INT [127.0.0.1:6379]] \
|
|
|
|
[--headerBarUrl STRING] \
|
|
|
|
[--logoUrl STRING] \
|
|
|
|
[--faviconUrl STRING] \ '
|
2025-06-03 12:12:48 +02:00
|
|
|
)
|
2015-02-08 21:48:15 -08:00
|
|
|
|
|
|
|
exports.server = {
|
2021-11-29 19:14:50 +01:00
|
|
|
port: argv.port || 8080,
|
2025-06-03 12:12:48 +02:00
|
|
|
baseurl: argv.baseurl || '/'
|
2021-11-29 19:14:50 +01:00
|
|
|
}
|
2015-02-08 21:48:15 -08:00
|
|
|
|
2025-06-03 12:12:48 +02:00
|
|
|
const redis_conf = argv.redis || '127.0.0.1:6379'
|
2011-03-12 19:30:22 -05:00
|
|
|
exports.database = {
|
2025-06-03 12:12:48 +02:00
|
|
|
sock: argv.sock || false,
|
|
|
|
type: 'redis',
|
2025-06-04 19:01:30 +03:00
|
|
|
prefix: '#memo#',
|
2025-06-03 12:12:48 +02:00
|
|
|
host: redis_conf.split(':')[0] || '127.0.0.1',
|
|
|
|
port: redis_conf.split(':')[1] || 6379
|
2021-11-29 19:14:50 +01:00
|
|
|
}
|
2011-03-14 00:07:01 -04:00
|
|
|
|
2025-06-04 19:01:30 +03:00
|
|
|
exports.headerBarUrl = argv.headerBarUrl || null
|
|
|
|
exports.logoUrl = argv.logoUrl || null
|
|
|
|
exports.faviconUrl = argv.faviconUrl || null
|