ryannolson
v0.0.3
Published
Ryannolson is a meta package for my personal packages and utilities
Downloads
1
Readme
This package is NOT supported.
You're welcome to use it, all code is MIT licensed by Ryan Olson
I intend for this to be a collection of high quality software that I use in my various personal projects.
I do not, however, feel any obligation to fix issues for others who use it.
Like the MIT license says, you can freely use this software, but it comes with zero warranty.
#Log
Log is to be used to log requests that are requested from an HTTP server.
##Usage
If you had an http server that was using stack to manage distributing content, you can add ryannolson.log() as one of the arguments and you would get some logging on your requests.
var ryannolson = require('ryannolson');
var http = require('http');
var stack = require('stack');
http.createServer(stack(
ryannolson.log(),
require('my-middleware')()
)
).listen(8000);
If you were to make a request to http://localhost:8000/index.html, you would get this logged on the server:
GET /index.html 200 Content-Type=text/html