koa-modules / morgan Goto Github PK
View Code? Open in Web Editor NEWmorgan for koa
License: MIT License
morgan for koa
License: MIT License
when i use the fomat 'dev' like this
app.use(gzip());
app.use(morgan.middleware('dev'));
logs show
GET /static/lib/vue/vue.min.js 200 6.866 ms - -
Something seems to be quite right
$ node -v
v4.2.1
Dependencies:
"dependencies": {
"koa": "1.1.2",
"koa-morgan": "1.0.0"
}
Code:
var koa = require('koa');
var morgan = require('koa-morgan');
var app = koa();
app.use(morgan('dev'));
Error:
AssertionError: app.use() requires a generator function
change getip function in morgan module index.js, and req.headers['x-real-ip'] will show the real ip!
How would you use this with the async-await syntax for Koa v2?
Hi, I found in v1.0.0 added "dependencies": {"morgan": "github:expressjs/morgan"}
, then the morgan npm package cannot be cached or mirrored and has to be pull for github everytime, that broke our massive deployment.
May I know the reason why it changed, or could it be reverted to normal npm versions? Thanks
Thank you for koa-morgan.
Politely, it would be great if the package version would be bumped. The package was last published 7.5 years ago which could be an indicator the package is no-longer maintained
Hi, can I use ctx
or ctx.state
in skip
or token
functions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.