UNPKG

expresser

Version:

A ready to use Node.js web app wrapper, built on top of Express.

123 lines (121 loc) 5.26 kB
// 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.ENV.json with the // specific APP_ENV or NODE_ENV environment values. For example settings.production.json. { // APP // ------------------------------------------------------------------------- "app": { // Sets the "Access-Control-Allow-Origin" header. To allow all, set it to "*". "allowOriginHeader": null, // Body parser module options. Depends on the body-parser middleware being installed. "bodyParser": { "enabled": true, // Extended URL encoded? "extended": true, // Default post data limit is set to 10MB by default. "limit": "10mb", // Raw bodies have a higher limit, 50MB. "rawLimit": "50mb", // Which types should be parsed by the raw body parser? Set to null to disable. "rawTypes": ["application/octet-stream", "application/pdf", "audio/*", "image/*", "video/*"] }, // Enable HTTP compression? Depends on the compression middleware being installed. "compression": { "enabled": false, // Level of compression, from 0 (fast) to 9 (more compression). "level": 6 }, // Cookie options. Depends on the cookie-parser middleware being installed. "cookie": { "enabled": false }, // Emit events for different methods. "events": { // Emit an event for "render". "render": false }, // Enable HTTP2? "http2": false, // Node.js server IP. Leaving blank or null will set the server to listen on all addresses. "ip": null, // Node.js server port. "port": 8080, // Path to the public static folder used by Express. Set to null to not configure the static folder. "publicPath": "./public/", // Secret key used for session and cookies encryption. "secret": "ExpresserSecret", // Session options. Depends on the express-session middleware being installed. "session": { "enabled": false, // Interval in milliseconds to check for expired sessions, default is 5 minutes. "checkPeriod": 300000, // Set HttpOnly flag on session cookies? "httpOnly": true, // Max age of session cookies, in seconds, default is 20min. "maxAge": 1200, // Proxy session cookies? Enabled if using behind a proxy / load balancer. "proxy": true, // Resave session after each request even if unchanged? "resave": false, // Save uninitialized sessions to the store? "saveUninitialized": false, // Use secure cookies for session management? Needs HTTPS to work! "secure": false }, // SSL options to bind server to HTTPS. "ssl": { // Is SSL enabled? Please note that you must specify the path to the // certificate files below. "enabled": false, // Path to the SSL key file. "keyFile": null, // Path to the SSL certificate file. "certFile": null, // Set to false to ignore SSL / TLS certificate warnings and accept expired // and self-signed certificates (not recommended on production). "rejectUnauthorized": true }, // Server request / response timeout, in milliseconds, default is 2 minutes. "timeout": 120000, // The app title. This must be set so Expresser can properly identify your app. "title": "Expresser", // Trust proxy for secure cookies etc? Default is 1 (trust). "trustProxy": 1, // The app's base URL, including http(s)://. "url": "http://github.com/igoramadas/expresser", // The view engine used by Express, for example "pug".. Leave null to not use a view engine. "viewEngine": null, // Default view options to be passed to the Express renderer. "viewOptions": { "layout": false }, // Path to the views directory. "viewPath": "./assets/views/" }, "general": { // Enable app wide debugging? "debug": false, // Default encoding is UTF8. "encoding": "utf8" }, "logger": { // Enable the default error logging for failed requests. "errorHandler": false, // Log error stack traces? Set to true with care, as it might expose sensitive data. "errorStack": false, // Max depth of sub properties to be logged for JSON objects. "maxDepth": 10 }, "routes": { // Default filename of the routes JSON file. "filename": "routes.json", "swagger": { // Expose loaded swagger file on the /swagger.json route. "exposeJson": false, // Default filename of the swagger definitions file. "filename": "swagger.json" } } }