@ladjs/api
Advanced tools
Comparing version 0.1.4 to 0.1.5
12
index.js
@@ -109,15 +109,13 @@ const http = require('http'); | ||
// specify that this is our api (used by error handler) | ||
app.context.api = true; | ||
// override koa's undocumented error handler | ||
app.context.onerror = errorHandler; | ||
// specify that this is our api (used by error handler) | ||
app.context.api = true; | ||
// response time | ||
app.use(responseTime()); | ||
// add the logger for development environment only | ||
// TODO: there's a weird logger issue, see this GH issue | ||
// <https://github.com/koajs/logger/issues/49> | ||
if (process.env.NODE_ENV === 'development') app.use(koaLogger()); | ||
// request logger with custom logger | ||
app.use(koaLogger({ logger })); | ||
@@ -124,0 +122,0 @@ // rate limiting |
{ | ||
"name": "@ladjs/api", | ||
"description": "API server for Lad", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
@@ -25,3 +25,3 @@ "ava": { | ||
"koa-404-handler": "^0.0.2", | ||
"koa-better-error-handler": "^1.3.4", | ||
"koa-better-error-handler": "^1.3.5", | ||
"koa-better-timeout": "^0.0.2", | ||
@@ -34,3 +34,3 @@ "koa-bodyparser": "^4.2.0", | ||
"koa-json": "^2.0.2", | ||
"koa-logger": "^3.1.0", | ||
"koa-logger": "https://github.com/niftylettuce/logger", | ||
"koa-no-trailing-slash": "^2.1.0", | ||
@@ -37,0 +37,0 @@ "koa-response-time": "^2.0.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
HTTP dependency
Supply chain riskContains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
22
11642
182
1
3
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedhumanize-number@0.0.2(transitive)
- Removedkoa-logger@3.2.1(transitive)
- Removedpassthrough-counter@1.0.0(transitive)
- Removedsupports-color@5.5.0(transitive)