-
Notifications
You must be signed in to change notification settings - Fork 240
/
base_config.js
105 lines (103 loc) · 3.14 KB
/
base_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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
var path = require('path')
, config
, cwd = process.cwd();
config = {
// Default to prod
environment: 'development'
// Number of worker-processes to spawn
, workers: 2
// Port to listen on
, port: 4000
// Default to no SSL and SPDY setup
, spdy: null
, ssl: null
// Include stack traces in error pages
, detailedErrors: true
// Milliseconds before a request times out
// Value must be truthy + greater than zero
// to have effect -- default to no timeout
, requestTimeout: null
// Maps flash message keys to css classes
, flash: {
defaultClass: 'alert'
, inlineClasses: {
success: 'alert alert-success',
alert: 'alert',
error: 'alert alert-error',
info: 'alert alert-info'
}
, blockClasses: {
success: 'alert alert-block alert-success',
alert: 'alert alert-block',
error: 'alert alert-block alert-error',
info: 'alert alert-block alert-info'
}
}
// Set stdout to debug log-level
, debug: false
// List of files to watch in order to restart geddy on changes in
// development environment. Set these in config/development.js
, watch: {
files: []
, includePattern: ''
, excludePattern: ''
}
// Use worker-process rotation
, rotateWorkers: true
// How long for a full rotation
, rotationWindow: 2 * 60 * 60 * 1000
// How long to wait for in-flight requests before rotating
, rotationTimeout: 5 * 60 * 1000
// Default logfile location
, logDir: path.normalize(cwd + '/log')
// How long to wait for in-flight requests before killing
, gracefulShutdownTimeout: 30000
// Number of milliseconds between heartbeat calls from
// the worker to the master
, heartbeatInterval: 5000
// Number of milliseconds old a heartbeat-timestamp can be
// before assuming a worker is hung, and needs to be killed
, heartbeatWindow: 20000
// Place to look for static content to serve in dev-mode
, staticFilePath: path.normalize(cwd + '/public')
// Name of host to use for serving static assets -- default to
// empty string, to allow stuff to be served from '/js', '/css', etc.
, assetHost: ''
// Prefix for js/css/img directories for serving static assets
// Relative paths in helpers (scriptLink, styleLink, imageTag)
// will use this prefix + plus asset type
, assetBasePath: '/'
// static file cache control
, cacheControl: {
// should contain mime-types as keys and expiration time in seconds
// as values, if mime type was not found the default will be used
expires: {
default: 0
}
}
// Default session-settings -- setting to null will mean no sessions
, sessions: {
store: 'cookie',
key: 'sid',
expiry: 14 * 24 * 60 * 60
}
// Key for when using Cookie session-store
, cookieSessionKey: 'sdata'
// Where to look for locale text-files by default
, i18n: {
defaultLocale: 'en-us'
, loadPaths: [path.normalize(cwd + '/config/locales')]
}
// Used anywhere you need to refer to the app
, appName: 'Geddy App'
// Default to null, accept connections directed to any IPv4 address
, hostname: null
// Used in helpers
, fullHostname: null
// Switch for making before/after filters compatible with
// Connect middleware
, connectCompatibility: false
// No mailer support by default
, mailer: null
};
module.exports = config;