Gathering detailed insights and metrics for koa-error-ejs
Gathering detailed insights and metrics for koa-error-ejs
npm install koa-error-ejs
Typescript
Module System
NPM Version
64.5
Supply Chain
83.7
Quality
73.6
Maintenance
25
Vulnerability
100
License
JavaScript (100%)
Total Downloads
2,445
Last Day
1
Last Week
4
Last Month
10
Last Year
64
1 Stars
9 Commits
2 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
0.0.2
Package Id
koa-error-ejs@0.0.2
Size
2.55 kB
NPM Version
1.4.9
Cumulative downloads
Total Downloads
Last day
-50%
1
Compared to previous day
Last week
0%
4
Compared to previous week
Last month
66.7%
10
Compared to previous month
Last year
-27.3%
64
Compared to previous year
Error response middleware for koa supporting:
text
json
html
Based on koa-error, adapter to use EJS as view
1$ npm install koa-error
and then copy the default error view to your views folder
1$ cp node_modules/koa-error-ejs/error.html views/
view
String path to template written with ejs. Defaults to {view.root}/errorlayout
String|Boolean layout to use on error view, or false if none. Defaults to false.custom
Object specific view for a status code, for example: {404: 'error/not-found'}. Defaults to {}By using the view
option you can override the bland default template,
with the following available local variables:
env
ctx
request
response
error
stack
status
code
Here's an example:
1<!DOCTYPE html> 2<html> 3 <head> 4 <title>Error - <%=status%></title> 5 </head> 6 <body> 7 <div id="error"> 8 <h1>Error</h1> 9 <p>Looks like something broke!</p> 10 <% if(env === 'development'){ %> 11 <pre> 12 <code> 13 <%-stack%> 14 </code> 15 </pre> 16 <% } %> 17 </div> 18 </body> 19</html>
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More