2025-06-03 12:12:48 +02:00
/ * e x p o r t s . d a t a b a s e = {
2011-03-12 19:30:22 -05:00
type : 'mongodb' ,
hostname : 'localhost' ,
port : 27017 ,
database : 'scrumblr'
} ;
2011-03-14 00:07:01 -04:00
* /
2011-03-12 19:30:22 -05:00
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 ] ] \
[ -- gaEnabled ] \
[ -- gaAccount STRING [ UA - 2069672 - 4 ] ] \
[ -- 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
exports . googleanalytics = {
2025-06-03 12:12:48 +02:00
enabled : argv . gaEnabled || false ,
account : argv . gaAccount || 'UA-2069672-4'
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' ,
prefix : '#scrumblr#' ,
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-03 12:12:48 +02:00
exports . headerBarUrl = argv . headerBarUrl || null /* example url with appropriate json markup : 'https://colibris-lemouvement.org/archipel-markup?domain=colibris-outilslibres.org' */
exports . logoUrl = argv . logoUrl || null /* example logo url : 'https://postit.colibris-outilslibres.org/images/logo-Post-it.svg' */
exports . faviconUrl = argv . faviconUrl || null /* example favicon url : 'https://postit.colibris-outilslibres.org/images/favicon.png' */