UNPKG

5.99 kBJSONView Raw
1// DEFAULT EXPRESSER SETTINGS
2// This file has the default settings for all Expresser modules.
3// If you want to define or override settings, please create a settings.json
4// file, or for specific environments create a settings.NODE_ENV.json with the
5// specific NODE_ENV values. For example settings.production.json.
6
7{
8 // APP
9 // -------------------------------------------------------------------------
10 "app": {
11 // Sets the "Access-Control-Allow-Origin" header. To allow all, set it to "*".
12 "allowOriginHeader": null,
13 // Body parser module options. Depends on the body-parser middleware being installed.
14 "bodyParser": {
15 "enabled": true,
16 // Extended URL encoded?
17 "extended": true,
18 // Add a rawBody to the request with the unparsed request body?
19 "rawBody": false,
20 // Default post data limit is set to 10MB by default.
21 "limit": "10mb",
22 // Raw bodies have a higher limit, 50MB.
23 "rawLimit": "50mb",
24 // Which types should be parsed by the raw body parser?
25 "rawTypes": ["application/octet-stream", "application/pdf", "audio/*", "image/*", "video/*"]
26 },
27 // Enable HTTP compression? Depends on the compression middleware being installed.
28 "compression": {
29 "enabled": false,
30 // Level of compression, from 0 (fast) to 9 (more compression).
31 "level": 6
32 },
33 // Cookie options. Depends on the cookie-parser middleware being installed.
34 "cookie": {
35 "enabled": false
36 },
37 // Emit events for different methods.
38 "events": {
39 // Emit an event for "render".
40 "render": false
41 },
42 // Node.js server IP. Leaving blank or null will set the server to listen on all addresses.
43 "ip": null,
44 // Node.js server port.
45 "port": 8080,
46 // Path to the public static folder used by Express. Set to null to not configure the static folder.
47 "publicPath": "./public/",
48 // Secret key used for session and cookies encryption.
49 "secret": "ExpresserSecret",
50 // Session options. Depends on the express-session middleware being installed.
51 "session": {
52 "enabled": false,
53 // Interval in milliseconds to check for expired sessions, default is 5 minutes.
54 "checkPeriod": 300000,
55 // Set HttpOnly flag on session cookies?
56 "httpOnly": true,
57 // Max age of session cookies, in seconds, default is 20min.
58 "maxAge": 1200,
59 // Proxy session cookies? Enabled if using behind a proxy / load balancer.
60 "proxy": true,
61 // Resave session after each request even if unchanged?
62 "resave": false,
63 // Save uninitialized sessions to the store?
64 "saveUninitialized": false,
65 // Use secure cookies for session management? Needs HTTPS to work!
66 "secure": false
67 },
68 // SSL options to bind server to HTTPS.
69 "ssl": {
70 // Is SSL enabled? Please note that you must specify the path to the
71 // certificate files below.
72 "enabled": false,
73 // Path to the SSL key file.
74 "keyFile": null,
75 // Path to the SSL certificate file.
76 "certFile": null,
77 // Set to false to ignore SSL / TLS certificate warnings and accept expired
78 // and self-signed certificates (not recommended on production).
79 "rejectUnauthorized": true
80 },
81 // Server request / response timeout, in milliseconds, default is 2 minutes.
82 "timeout": 120000,
83 // The app title. This must be set so Expresser can properly identify your app.
84 "title": "Expresser",
85 // Trust proxy for secure cookies etc? Default is 1 (trust).
86 "trustProxy": 1,
87 // The app's base URL, including http(s)://.
88 "url": "http://github.com/igoramadas/expresser",
89 // The view engine used by Express, for example "pug".. Leave null to not use a view engine.
90 "viewEngine": null,
91 // Default view options to be passed to the Express renderer.
92 "viewOptions": {
93 "layout": false
94 },
95 // Path to the views directory.
96 "viewPath": "./assets/views/"
97 },
98 "general": {
99 // Enable app wide debugging?
100 "debug": false,
101 // Default encoding is UTF8.
102 "encoding": "utf8"
103 },
104 "logger": {
105 // Log error stack traces? Set to true with care, as it might expose sensitive data.
106 "errorStack": false,
107 // Max depth of sub properties to be logged for JSON objects.
108 "maxDepth": 6,
109 // List of user defined properties to be masked. Difference from obfuscate setting above is that the length will be
110 // the same and last characters of the value will not be masked out (for example, leave last 4 digits of phone numbers).
111 "maskFields": {
112 "mobile": 4,
113 "phone": 4
114 },
115 // List of properties to be obfuscated with the static value "***". This is useful to hide passwords, secret keys, etc.
116 // Values separated by comma, case insensitive.
117 "obfuscateFields": "password,passwordhash,token,accesstoken,access_token,refreshtoken,refresh_token",
118 // List of properties to be removed. This is used to take out specific data from logs (functions for example).
119 // Values separated by comma.
120 "removeFields": null
121 },
122 "routes": {
123 // Default filename of the routes JSON file.
124 "filename": "routes.json",
125 "swagger": {
126 // Expose loaded swagger file on the /swagger.json route.
127 "exposeJson": false,
128 // Default filename of the swagger definitions file.
129 "filename": "swagger.json"
130 }
131 }
132}