2020-12-01 20:16:51 +01:00
const config = {
domain : 'teddit.net' ,
reddit _app _id : 'H6-HjZ5pUPjaFQ' ,
cert _dir : ` /home/teddit/letsencrypt/live/teddit.net ` , // no trailing slash
video _enabled : true ,
ssl _port : 8088 ,
nonssl _port : 8080 ,
listen _address : '0.0.0.0' ,
https _enabled : true ,
redirect _http _to _https : true ,
use _compression : true ,
use _view _cache : false ,
use _helmet : true ,
use _helmet _hsts : true ,
trust _proxy : false , // Enable trust_proxy if you are using reverse proxy like nginx
trust _proxy _address : '127.0.0.1' ,
setexs : {
/ * * ,
* Redis cache expiration values ( in seconds ) .
* When the cache expires , new content is fetched from Reddit ' s API ( when
* the given URL is revisited ) .
* /
frontpage : 600 ,
subreddit : 600 ,
posts : 600 ,
user : 600 ,
searches : 600 ,
sidebar : 60 * 60 * 24 * 7 // 7 days
} ,
2020-12-03 17:15:43 +01:00
post _comments _sort : 'confidence' , // one of: confidence, top, new, controversial, old, random, qa, live
2020-12-01 20:16:51 +01:00
valid _media _domains : [ 'preview.redd.it' , 'external-preview.redd.it' , 'i.redd.it' , 'v.redd.it' , 'a.thumbs.redditmedia.com' , 'b.thumbs.redditmedia.com' , 'thumbs.gfycat.com' , 'i.ytimg.com' ] ,
reddit _api _error _text : ` Seems like your instance is either blocked (e.g. due to API rate limiting), reddit is currently down, or your API key is expired and not renewd properly. This can also happen for other reasons. `
} ;
module . exports = config ;