2011-03-14 00:07:01 -04: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
2021-11-29 19:14:50 +01:00
var 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 ] \ '
2021-11-29 19:14:50 +01:00
) . argv
2015-02-08 21:48:15 -08:00
exports . server = {
2021-11-29 19:14:50 +01:00
port : argv . port || 8080 ,
baseurl : argv . baseurl || "/" ,
}
2015-02-08 21:48:15 -08:00
exports . googleanalytics = {
2021-11-29 19:14:50 +01:00
enabled : argv [ "gaEnabled" ] || false ,
account : argv [ "gaAccount" ] || "UA-2069672-4" ,
}
2015-02-08 21:48:15 -08:00
2021-11-29 19:14:50 +01:00
var redis _conf = argv . redis || "127.0.0.1:6379"
2011-03-12 19:30:22 -05:00
exports . database = {
2021-11-29 19:14:50 +01:00
sock : argv [ "sock" ] || false ,
type : "redis" ,
prefix : "#scrumblr#" ,
host : redis _conf . split ( ":" ) [ 0 ] || "127.0.0.1" ,
port : redis _conf . split ( ":" ) [ 1 ] || 6379 ,
}
2011-03-14 00:07:01 -04:00
2021-12-01 11:28:56 +00: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' */
2022-04-14 09:21:17 +03:00
exports . faviconUrl = argv [ 'faviconUrl' ] || null /* example favicon url : 'https://postit.colibris-outilslibres.org/images/favicon.png' */