fastboot-app-server
Advanced tools
Comparing version 3.2.0 to 3.3.0
{ | ||
"name": "fastboot-app-server", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"description": "A production-ready app server for running Ember FastBoot apps", | ||
@@ -31,4 +31,4 @@ "keywords": [ | ||
"express": "^4.17.2", | ||
"fastboot": "3.2.0", | ||
"fastboot-express-middleware": "3.2.0" | ||
"fastboot": "3.3.0", | ||
"fastboot-express-middleware": "3.3.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "devDependencies": { |
@@ -45,2 +45,3 @@ ## Ember FastBoot App Server | ||
buildSandboxGlobals(defaultGlobals) { // Optional - Make values available to the Ember app running in the FastBoot server, e.g. "MY_GLOBAL" will be available as "GLOBAL_VALUE" | ||
log: true, // Optional - Specifies whether the server should use its default request logging. Useful for turning off default logging when providing custom logging middlewares | ||
return Object.assign({}, defaultGlobals, { GLOBAL_VALUE: MY_GLOBAL }); | ||
@@ -138,2 +139,22 @@ }, | ||
## Logging | ||
We provide simple log output by default, but if you want more logging control, you can disable the | ||
simple logger using the `log: false` option, and provide a custom middleware that suits your logging needs: | ||
```js | ||
let server = new FastBootAppServer({ | ||
log: false, | ||
beforeMiddleware: function(app) { | ||
let logger = function(req, res, next) { | ||
console.log('Hello from custom request logger'); | ||
next(); | ||
}; | ||
app.use(logger); | ||
}, | ||
}); | ||
``` | ||
## Downloaders | ||
@@ -140,0 +161,0 @@ |
@@ -28,2 +28,3 @@ "use strict"; | ||
this.chunkedResponse = options.chunkedResponse; | ||
this.log = options.log; | ||
@@ -30,0 +31,0 @@ if (!this.ui) { |
@@ -22,2 +22,3 @@ "use strict"; | ||
this.chunkedResponse = options.chunkedResponse; | ||
this.log = options.log; | ||
@@ -84,2 +85,3 @@ if (!this.httpServer) { | ||
chunkedResponse: this.chunkedResponse, | ||
log: this.log, | ||
}); | ||
@@ -86,0 +88,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29854
402
271
+ Addedfastboot@3.3.0(transitive)
+ Addedfastboot-express-middleware@3.3.0(transitive)
- Removedfastboot@3.2.0(transitive)
- Removedfastboot-express-middleware@3.2.0(transitive)
Updatedfastboot@3.3.0