]> git.r.bdr.sh - rbdr/dasein/blob - config/config.js
1c1c8a05e52c140d6246c9ad95e8a2735a3ec211
[rbdr/dasein] / config / config.js
1 'use strict';
2
3 const Getenv = require('getenv');
4
5 const internals = {};
6
7 module.exports = internals.Config = {
8 cookieKeys: Getenv.array('DASEIN_COOKIE_KEYS'), // Signatures for the cookies
9 port: Getenv.int('DASEIN_PORT', 1927), // Port to listen on
10 hostname: Getenv('DASEIN_HOSTNAME', 'localhost'), // Domain to listen on, used for cookies
11 staticDirectory: Getenv('DASEIN_STATIC_DIRECTORY', 'static'), // Location of static assets
12 jwt: {
13 cookieName: Getenv('DASEIN_JWT_COOKIE_NAME', 'dasein_jwt'), // Name of cookie where jwt is stored
14 duration: Getenv('DASEIN_JWT_DURATION', 86400), // Duration of JWT (24 hours)
15 secret: Getenv('DASEIN_JWT_SECRET') // Secret to sign JWT
16 },
17 twitter: {
18 consumerKey: Getenv('DASEIN_TWITTER_CONSUMER_KEY'), // Consumer key for twitter
19 consumerSecret: Getenv('DASEIN_TWITTER_CONSUMER_SECRET') // Consumer secret for twitter
20 }
21 };