{"name":"test-server","version":"0.1.0","description":"Easy testing of a HTTP server","keywords":[],"author":{"name":"Raynos","email":"raynos2@gmail.com"},"repository":{"type":"git","url":"git://github.com/Raynos/test-server.git"},"main":"index","homepage":"https://github.com/Raynos/test-server","contributors":[{"name":"Jake Verbaten"}],"bugs":{"url":"https://github.com/Raynos/test-server/issues","email":"raynos2@gmail.com"},"dependencies":{"request":"~2.9.203","xtend":"~1.0.3","ap":"~0.1.0"},"devDependencies":{"testling":"git://github.com/Raynos/testling#master","testem":"git://github.com/Raynos/testem#master","sinon":"git://github.com/Raynos/Sinon.JS.git","tap":"0.2.5"},"licenses":[{"type":"MIT","url":"http://github.com/Raynos/test-server/raw/master/LICENSE"}],"scripts":{"test":"make node-test"},"readme":"# test-server [![build status][1]][2]\n\nEasy testing of a HTTP server\n\n## Example\n\ntestServer will create a HTTP server for you on a port. It will use the first function you pass as the request handler and fire the second function when the server is done listening.\n\nThe second version is passed a version of mikeal's request that turns \"/foo\" into \"http://localhost:PORT/foo\". It's also passed a done function to call when you are done testing and want to kill the HTTP server\n\n    var testServer = require(\"test-server\")\n        , assert = require(\"assert\")\n\n    testServer(function (req, res) {\n        res.end(\"beep\")\n    }, function (request, done) {\n        request(\"/\", function (err, res, body) {\n            assert.equal(body, \"beep\")\n            done()\n        })\n    })\n\n### testServer(requestHandler[, options], callback)\n\nThe options are \n\n    {\n        port: Number\n        , timeout: Number\n        , protocol: \"http\" || \"https\"\n        , host: someString\n    }\n\n - port is the port the server will listen on and defaults to 3002\n - timeout is the number of milliseconds before the server auto-shutsdown. This defaults to 5000 and is useful to timeout your tests\n - protocol is the protocol for calls, the default is http\n - host is the domain host to call. It defaults to localhost\n\n## Installation\n\n`npm install test-server`\n\n## Tests\n\n`make test`\n\n## Contributors\n\n - Raynos\n\n## MIT Licenced\n\n  [1]: https://secure.travis-ci.org/Raynos/test-server.png\n  [2]: http://travis-ci.org/Raynos/test-server","readmeFilename":"README.md","_id":"test-server@0.1.0","dist":{"shasum":"9a9755f5a0754ff474042cf7a2cc8ea23f27403e","tarball":"http://registry-npm.ywwl.com/test-server/download/test-server-0.1.0.tgz","integrity":"sha512-KZblumNj1ByeeqS3nfbx2IUTbgEQZ8cVR0gBTFs3XDYhVPrroeCEkPYzJnBONHTW7aDnSPuD4Yv88n7JJTxumw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpXk/ClF94W4GtorIsgwwqncy6/CWwEv0J6bp4cJ0hVwIhAIV85qDgSr8lrGV+qO9Qiqt7Yzeuj8OwuGr9CcsaEeVu"}],"size":2820,"noattachment":false,"key":"/test-server/-/test-server-0.1.0.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"maintainers":[{"name":"raynos","email":"raynos2@gmail.com"}],"publish_time":1354148600519,"_cnpm_publish_time":1354148600519,"dist-tags":{"latest":"0.2.1"}}