Created
September 27, 2014 10:28
-
-
Save rymizuki/387de6c3ff2f523c5cd9 to your computer and use it in GitHub Desktop.
morganのformat拡張方法 ref: http://qiita.com/rymizuki@github/items/6b6686489a32d13df6c4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"); | |
var express = require("express"); | |
var morgan = require("morgan"); | |
morgan.format("orig-format", "[:date] :method :url :status :response-time ms"); | |
app = express(); | |
app.use(morgan("orig-format")); | |
app.get("/", function (req, res) { | |
res.send("Hello World\n"); | |
}); | |
http.createServer(app).listen(3000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Sat, 27 Sep 2014 10:23:23 GMT] GET / 200 100 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment