expresser
Version:
A ready to use Node.js web app wrapper, built on top of Express.
147 lines (145 loc) • 6.87 kB
JSON
// DEFAULT EXPRESSER SETTINGS
// This file has the default settings for all Expresser modules.
// If you want to define or override settings, please create a settings.json
// file, or for specific environments create a settings.NODE_ENV.json with the
// specific NODE_ENV values. For example settings.production.json.
{
// APP
// -------------------------------------------------------------------------
"app": {
// Enable HTTP compression?
"compressionEnabled": false,
// Enable cookies on Express?
"cookieEnabled": true,
// Secret key used for cookie encryption.
"cookieSecret": "ExpresserCookie",
// Node.js server IP. Leaving blank or null will set the server to listen on all addresses.
// This value might be overriden by PaaS environmental values.
"ip": null,
// If paas is true, Expresser will figure out some settings out of environment variables
// like IP, ports and tokens. Leave false if you're not deploying to AppFog, Heroku, OpenShift etc.
"paas": false,
// Node.js server port. Please note that this value might be overriden by PaaS
// environmental values (like in AppFog or OpenShift).
"port": 8080,
// Enable session store? This will use the cookieSession implementation of Express.
"sessionEnabled": true,
// Secret key used for session encryption.
"sessionSecret": "ExpresserSession",
// The view engine used by Express. Default is jade.
"viewEngine": "jade",
// Connect Assets options.
"connectAssets": {
// Build assets? True or false.
"build": true,
// Build directories? True or false.
"buildDir": false,
// Minify JS and CSS builds? True or false.
"compress": true,
"gzip": true
},
// SSL options to bind server to HTTPS.
"ssl": {
// Is SSL enabled? Please note that you must specify the path to the
// certificate files under the `Path` settings.
"enabled": false,
// Path to the SSL key file.
"keyFile": null,
// Path to the SSL certificate file.
"certFile": null,
// Create a redirector server to redirect requests from HTTP to HTTPS.
// This is the port number of the HTTP redirector server. Leave 0, blank
// or null to disable this feature.
"redirectorPort": 0
},
// The app title. This must be set so Expresser can properly identify your app.
"title": "Expresser",
// The app's base URL, including http://.
"url": "http://github.com/igoramadas/expresser"
},
// DATABASE
// ----------------------------------------------------------------------
"database": {
// Enable database? If `false` the MongoDB database module won't be initialized.
"enabled": true,
// How many retries before switching to the failover database or aborting a database operation.
"maxRetries": 3,
// How long between connection retries, in milliseconds. Default is half a second.
"retryInterval": 500
},
// EVENTS
// -------------------------------------------------------------------------
"events": {
// Enable central event dispatcher? Please note that if you disable it some
// inter-module features will not work, although it won't give you exceptions on errors.
"enabled": true
},
// FIREWALL
// -------------------------------------------------------------------------
"firewall": {
// Built-in firewall is disable by default.
"enabled": false
},
// GENERAL
// -------------------------------------------------------------------------
"general": {
// DEPRECATED (appTitle) Use settings.app.title instead.
"appTitle": null,
// DEPRECATED (appUrl) Use settings.app.url instead.
"appUrl": null,
// Enable or disable debugging messages. Should be false on production environments.
"debug": false,
// Default encoding to be used on IO and web requests.
"encoding": "utf8",
// How long (seconds) should files read from disk (email templates for example) stay in cache?
"ioCacheTimeout": 60
},
// LOGGER
// -------------------------------------------------------------------------
"logger": {
// If true, other modules will use the Logger to log errors before throwing them as exceptions.
// By default it's false, as ideally you should log errors yourself inside the callbacks.
"autoLogErrors": false,
// Output logs to the console? True or false.
"console": true,
// Unless you have very specific reasons, leave enabled always true otherwise nothing will be logged.
"enabled": true,
// Define all log types which should be treated as error (red colour on the console).
"errorLogTypes": "err,error,warn,warning,critical",
// Define which log levels should be enabled. For example if you only want to log warnings and errors,
// set this value to ["warn", "error"].
"levels": [
"info",
"warn",
"error",
"critical"
],
// List will all field / property names to be removed from logs.
// Default list is "Password, password, passwordHash and passwordEncrypted".
"removeFields": "Password,password,passwordHash,passwordEncrypted",
// If `sendIP` is true, the IP address of the machine will be added to logs events.
// Useful when you have different instances of the app running on different services.
"sendIP": true,
// If `sendTimestamp` is true, a timestamp will be added to logs events.
// Please note that Loggly and Logentries already have a timestamp, so in these
// cases you can leave this value set to false.
"sendTimestamp": true,
// Set `uncaughtException` to true to bind the logger to the `uncaughtException`
// event on the process and log all uncaught expcetions as errors.
"uncaughtException": true
},
// PATH
// -------------------------------------------------------------------------
"path": {
// Path to the email templates folder.
"emailTemplatesDir": "./emailtemplates/",
// Path to the public folder used by Express.
"publicDir": "./public/",
// DEPRECATED!!! Please use settings.app.ssl.keyFile!
"sslKeyFile": null,
// DEPRECATED!!! Please use settings.app.ssl.certFile!
"sslCertFile": null,
// Path where the .jade views are stored.
"viewsDir": "./views/"
}
}