Gathering detailed insights and metrics for koa-ejs
Gathering detailed insights and metrics for koa-ejs
Gathering detailed insights and metrics for koa-ejs
Gathering detailed insights and metrics for koa-ejs
a koa view render middleware, support all feature of ejs
npm install koa-ejs
Typescript
Module System
Node Version
NPM Version
84.7
Supply Chain
95.8
Quality
75.1
Maintenance
25
Vulnerability
100
License
JavaScript (96.03%)
HTML (3.97%)
Total Downloads
2,891,241
Last Day
257
Last Week
7,236
Last Month
36,468
Last Year
398,953
MIT License
250 Stars
94 Commits
55 Forks
7 Watchers
9 Branches
31 Contributors
Updated on Jun 30, 2025
Minified
Minified + Gzipped
Latest Version
4.3.0
Package Id
koa-ejs@4.3.0
Size
4.46 kB
NPM Version
6.12.0
Node Version
10.16.0
Published on
Dec 04, 2019
Cumulative downloads
Total Downloads
Last Day
149.5%
257
Compared to previous day
Last Week
-15.1%
7,236
Compared to previous week
Last Month
-12%
36,468
Compared to previous month
Last Year
-9.1%
398,953
Compared to previous year
Koa ejs view render middleware. support all feature of ejs.
1const Koa = require('koa'); 2const render = require('koa-ejs'); 3const path = require('path'); 4 5const app = new Koa(); 6render(app, { 7 root: path.join(__dirname, 'view'), 8 layout: 'template', 9 viewExt: 'html', 10 cache: false, 11 debug: true 12}); 13 14app.use(async function (ctx) { 15 await ctx.render('user'); 16}); 17 18app.listen(7001);
Or you can checkout the example.
layout
, set false
to disable layout.html
).true
).false
).%
).koa-ejs
supports layouts. The default layout file is layout
. If you want to change default layout file, use settings.layout
. Also you can specify layout by options.layout
in await ctx.render
.
Also you can set layout = false
to disable the layout.
<html>
<head>
<title>koa ejs</title>
</head>
<body>
<h3>koa ejs</h3>
<%- body %>
</body>
</html>
Supports ejs includes.
<div>
<% include user.html %>
</div>
Support ctx.state
in koa.
(The MIT License)
Copyright (c) 2017 dead-horse and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
Found 7/17 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-23
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