forked from browserify/wzrd.in
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
39 lines (35 loc) · 1.13 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
'use strict';
const _ = require('lodash');
const SECONDS = 1000;
const MINUTES = 60 * SECONDS;
const config = module.exports = {
admin: {
// CDN namespace for backwards compt
user: process.env.CDN_ADMIN_USER || process.env.WZRDIN_ADMIN_USER || null,
pass: process.env.CDN_ADMIN_USER || process.env.WZRDIN_ADMIN_PASS || null
},
builder: {
dockerTag: process.env.WZRDIN_DOCKER_TAG || 'browserify-builder'
},
// Defaults from here https://github.com/expressjs/cors/blob/master/lib/index.js#L7-L12
cors: {
origin: process.env.WZRDIN_CORS_ORIGIN || '*',
// This one's locked down a little
methods: process.env.WZRDIN_CORS_METHODS || 'GET,POST',
preflightContinue: false,
optionsSuccessStatus: 204
},
level: {
db: process.env.WZRDIN_LEVEL_DB || './cdn.db'
},
npm: {
registry: process.env.WZRDIN_NPM_REGISTRY || 'https://registry.npmjs.com',
skimdb: process.env.WZRDIN_NPM_SKIMDB || 'https://skimdb.npmjs.com:443',
follower: {
refreshRate: parseInt(process.env.WZRDIN_NPM_FOLLOWER_REFRESHRATE) || 2 * MINUTES
}
},
server: {
port: parseInt(process.env.PORT) || 8080
}
};