Skip to content

Instantly share code, notes, and snippets.

@rymizuki
Created September 27, 2014 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rymizuki/387de6c3ff2f523c5cd9 to your computer and use it in GitHub Desktop.
Save rymizuki/387de6c3ff2f523c5cd9 to your computer and use it in GitHub Desktop.
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);
[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