{"_id":"jsgi","_rev":"52-a96448edcf0a02bae14bf2c8e9257efc","name":"jsgi","dist-tags":{"latest":"1.0.1"},"versions":{"0.2.2":{"name":"jsgi","version":"0.2.2","directories":{"lib":"./lib"},"main":"./lib/jsgi-node","author":{"name":"Kris Zyp"},"_id":"jsgi@0.2.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/jsgi/-/jsgi-0.2.2.tgz","shasum":"acfc4eb50f8a4ac33ddafc3bfe59e219b29397b9","integrity":"sha512-IQQKhOp12UIqq/AlJNGR/pUvUH7nWuk73C4w1/9U8b9h19BnNxzALajx/85Ow52StA1zSQEhTmmhN9Twlg8o+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICEH6YXswraA6XIhE3Ak1E8+4ebofzSGtLc54OdggA9tAiEA10weBXLlZpixqH3vaGs8lTmXnHDOtp7YmFMGWJw7tDM="}]}},"0.2.5":{"name":"jsgi","version":"0.2.5","directories":{"lib":"./lib"},"main":"./lib/jsgi-node","description":"JSGI middleware server for NodeJS","author":{"name":"Kris Zyp"},"maintainers":[{"name":"nathan","email":"nrstott@gmail.com"}],"_npmJsonOpts":{"file":"/home/nathan/.npm/jsgi/0.2.5/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"jsgi@0.2.5","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.24","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"47cda6c8681f8c5e318b01df747727219eaaf4db","tarball":"https://registry.npmjs.org/jsgi/-/jsgi-0.2.5.tgz","integrity":"sha512-ZXvdfFl49pv+dGJ+9OWDedoTygVH+zxMFDiNBWBILfUDJMbNrhYbupDgmN6wVXsKje2BQivj3aV0jWVXJxdIeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICRTdgJiVLIZElql5YsgFPwPLM0QKgwv8HddvQy0afi3AiEAqfUDD/9ELS+rZHuo7h8qEVfinjFWmonl9lYnQ3/EWiY="}]},"scripts":{}},"0.0.1":{"name":"jsgi","version":"0.0.1","directories":{"lib":"./lib"},"main":"./lib/jsgi-node","author":{"name":"Kris Zyp"},"_id":"jsgi@0.0.1","description":"JSGI-Node provides an interface for running middleware [JSGI](http://wiki.commonjs.org/wiki/JSGI/Level0/A/Draft2) on Node. JSGI is an asynchronous middleware interface based on solid mature middleware design principles, and the asynchronous design fits pe","dist":{"shasum":"b0f0bc6721c38d4aafb229148c884ad8d7380f96","tarball":"https://registry.npmjs.org/jsgi/-/jsgi-0.0.1.tgz","integrity":"sha512-3sLGcQuIL7c059+cdPyaD2wQmypp2dNtm+6GBv9hdDepUoULbT3zKmF/iRzQuP1toBuXnmvHw/nG+WMxeiWzJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw2PbSxeTZ09l16KtuHcgLn9GRMI/BJWj1d/R2lmkjmAIhAIbWzWhb8JvHDsKdDHripp9LKxhXhGl9J1tWpvAkOgfT"}]},"scripts":{},"maintainers":[{"name":"nathan","email":"nrstott@gmail.com"}]},"0.2.4ssl":{"name":"jsgi","version":"0.2.4ssl","directories":{"lib":"./lib"},"main":"./lib/jsgi-node","author":{"name":"Kris Zyp"},"_id":"jsgi@0.2.4ssl","description":"JSGI-Node provides an interface for running middleware [JSGI](http://wiki.commonjs.org/wiki/JSGI/Level0/A/Draft2) on Node. JSGI is an asynchronous middleware interface based on solid mature middleware design principles, and the asynchronous design fits pe","dist":{"shasum":"2d3ade3f4230f7135096a30da9a51d90e62b9b4d","tarball":"https://registry.npmjs.org/jsgi/-/jsgi-0.2.4ssl.tgz","integrity":"sha512-RycnSFHuZaTtZGvKf46Ss7twiA5GEKqTs6qdaERESsMMyAkcMeO0EMxknkiBiFlkb7pQM6oZkKJJ1Zun74d4NQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+mclIXBm97vy33R4cAi6dn2jyG+9jJBDTuNAg1qEvhAiBi+LamKA23nyhCMcDDK4u9oPqj3JxoS4CTp7V6nfzX9g=="}]},"scripts":{},"maintainers":[{"name":"nathan","email":"nrstott@gmail.com"}]},"0.3.0":{"name":"jsgi","version":"0.3.0","directories":{"lib":"."},"main":"./jsgi-node","description":"JSGI middleware server for NodeJS","author":{"name":"Kris Zyp"},"maintainers":[{"name":"nathan","email":"nrstott@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/kriszyp/jsgi-node.git"},"gitHead":"9698652c40ff9b218c9aebce594058eb60e387ef","bugs":{"url":"https://github.com/kriszyp/jsgi-node/issues"},"homepage":"https://github.com/kriszyp/jsgi-node#readme","_id":"jsgi@0.3.0","scripts":{},"_shasum":"132d9e0ae19694bee6eda64f4fd0e9800395f115","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"nathan","email":"nrstott@gmail.com"},"dist":{"shasum":"132d9e0ae19694bee6eda64f4fd0e9800395f115","tarball":"https://registry.npmjs.org/jsgi/-/jsgi-0.3.0.tgz","integrity":"sha512-uclwck1LchWppvlpmRc4AbP6NP+jD99u8IRVCAIZuTpBSbnbQrfgXtJ9hE7RP9TR3WNqGK1VtnrpqaH0G0qvfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFwqMIc2khgnvrg6iv+byH34Z2olUVeR91Uz5PwUUvNEAiAF9nSlQzv8txZkHrWHD+JatEiLdCmnmYLlPilGRjuLSQ=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jsgi-0.3.0.tgz_1474824947350_0.10379343898966908"}},"1.0.0":{"name":"jsgi","version":"1.0.0","directories":{"lib":"."},"main":"./jsgi-node","description":"JSGI middleware server for NodeJS","author":{"name":"Kris Zyp"},"maintainers":[{"name":"nathan","email":"nrstott@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/kriszyp/jsgi-node.git"},"gitHead":"be18665a294eabe1dfc9cec1244bda46a354a8eb","bugs":{"url":"https://github.com/kriszyp/jsgi-node/issues"},"homepage":"https://github.com/kriszyp/jsgi-node#readme","_id":"jsgi@1.0.0","scripts":{},"_shasum":"ec83b75afc07174f3303263962ea69023849229e","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"nathan","email":"nrstott@gmail.com"},"dist":{"shasum":"ec83b75afc07174f3303263962ea69023849229e","tarball":"https://registry.npmjs.org/jsgi/-/jsgi-1.0.0.tgz","integrity":"sha512-1wO+vBOH/vJ6b5XvTCbABmbO3DQO6jwh5aHUlS4HfRrFiX3Z5h0E8Q/HZbxMuwpmuEN52SikryZwLnVc2dEn5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiPakQTPh62d3SLGNkVNaB6JtBsjcGKGnDagExqWcmNQIhAI2qOdMW0SN5h8dKpUa7UviHE13MmKflFMZNbLBpptha"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jsgi-1.0.0.tgz_1474825273502_0.30098354257643223"}},"1.0.1":{"name":"jsgi","version":"1.0.1","directories":{"lib":"."},"main":"./jsgi-node","description":"JSGI middleware server for NodeJS","author":{"name":"Kris Zyp"},"maintainers":[{"name":"nathan","email":"nrstott@gmail.com"},{"name":"soitgoes","email":"martin.murphy@whiteboard-it.com"}],"repository":{"type":"git","url":"git+https://github.com/kriszyp/jsgi-node.git"},"gitHead":"2b869fd6d03bc13de6b35c56725ab276afd03f0c","bugs":{"url":"https://github.com/kriszyp/jsgi-node/issues"},"homepage":"https://github.com/kriszyp/jsgi-node#readme","_id":"jsgi@1.0.1","scripts":{},"_shasum":"974ea0720ee10ee0fdd1a1cea5f7913dfeebf4c4","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"nathan","email":"nrstott@gmail.com"},"dist":{"shasum":"974ea0720ee10ee0fdd1a1cea5f7913dfeebf4c4","tarball":"https://registry.npmjs.org/jsgi/-/jsgi-1.0.1.tgz","integrity":"sha512-A66grEwjb5tUe+MBBm03h2NP85MMFORksBoegjblg1uFQKykACOSI/8e+uCFUs/eKL9GaySLtGapFSxvPMt2fA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRRT2MFrSAYo6n5vXM3za8l2HmUFHNg8EJnZSgvn+8qwIhANNGqntR7BO+MlElG91v3PoSUMVevxFMxyAPwJ97MOkV"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jsgi-1.0.1.tgz_1485889465288_0.8872236835304648"}}},"maintainers":[{"name":"nathan","email":"nrstott@gmail.com"},{"name":"soitgoes","email":"martin.murphy@whiteboard-it.com"}],"author":{"name":"Kris Zyp"},"time":{"modified":"2022-06-19T06:02:21.328Z","created":"2011-06-08T15:45:00.553Z","0.0.1":"2012-07-06T21:40:18.541Z","0.2.2":"2011-06-08T15:45:00.553Z","0.2.4ssl":"2012-07-06T21:40:25.476Z","0.2.5":"2011-08-12T21:05:53.603Z","0.3.0":"2016-09-25T17:35:49.084Z","1.0.0":"2016-09-25T17:41:15.524Z","1.0.1":"2017-01-31T19:04:27.301Z"},"description":"JSGI middleware server for NodeJS","users":{"nathan":true},"readme":"# JSGI 0.3 Adapter for Node\n\nJSGI-Node provides an interface for running [JSGI](http://wiki.commonjs.org/wiki/JSGI/Level0/A/Draft2) middleware on Node.\nJSGI is an asynchronous middleware interface based on solid mature middleware design\nprinciples, and the asynchronous design fits perfectly with Node. JSGI uses idiomatic JavaScript,\nleveraging closures for [simple and fast](http://www.sitepen.com/blog/2010/06/11/jsgi-vs-connect-for-node-middleware/) middleware connectivity.\nThis project does not include any JSGI components itself, but \na substantial set of JSGI middleware components that are available, many can be found\nin [Pintura](https://github.com/persvr/pintura).\n\n# Installation\n\nJSGI-Node can be installed with NPM:\n\n    npm install jsgi-node\n\n# Usage\n\nTo use, provide a JSGI application (can be application stack) to the start \nfunction:\n\n    require(\"jsgi-node\").start(function(request){\n      return {\n        status:200,\n        headers:{},\n        body:[\"Hello World!\"]\n      };\n    });\n\nThis adapter should conform to the JSGI 0.3 (with promises) for full \nasynchronous support. For example, here is an echo server that asynchronously\nwaits for the request and asynchonously provides it as the response:\n\n\n    require(\"jsgi-node\").start(function(request){\n      return request.body.join().then(function(requestBody){\n        return {\n          status:200,\n          headers:{},\n          body:[\"echo: \" + requestBody]\n        };\n      });\n    });\n\nAnd here is an example of using a promises from another source (from [promised-io's fs](http://github.com/persvr/promised-io)) and piping them to the\nresponse:\n\n    var fs = require(\"promised-io/fs\");\n    require(\"jsgi-node\").start(function(request){\n      return fs.readFile(\"jsgi-node.js\").then(function(body){\n        return {\n          status: 200,\n          headers: {},\n          body: [body]\n        };\n      });\n    });\n\n\nFile objects returned from [promised-io's fs](http://github.com/persvr/promised-io) can be directly provided as body for \nautomated streaming of data to the client from the filesystem:\n\n    var fs = require(\"promised-io/fs\");\n    require(\"jsgi-node\").start(function(request){\n      return {\n        status: 200,\n        headers: {},\n        body: fs.open(\"some-file.txt\",\"r\")\n      };\n    });\n\nThis package also includes an adapter for running Node HTTP apps on top of JSGI middleware:\n\n    var fs = require(\"promised-io/fs\"),\n        Node = require(\"jsgi/node\").Node;\n    require(\"jsgi-node\").start(\n      SomeJSGIMiddleWare(\n        OtherJSGIMiddleWare(\n          Node(function(request, response){\n           // request and response conform to Node's HTTP API\n          })\n        )\n      )\n    );\n\n## WebSocket with JSGI\n\nJSGI middleware can be used to handle incoming WebSocket messages. While JSGI\nis designed for HTTP, WebSocket includes HTTP elements and JSGI's streaming capabilities\nare well-suited for socket communication. JSGI delegation can be achieved by using\nthe \"ws-jsgi\" module in conjunction with the node-websocket-server package. \nThis \"ws-jsgi\" module exports a function that can be called with a socket server and\na JSGI handler. For example:\n<pre>\n\tvar http = require(\"http\").createServer(\n\t\t\trequire(\"jsgi-node\").Listener(jsgiApp)\n\t\t);\n\thttp.listen(80);\n\trequire(\"jsgi/ws-jsgi\")(ws.createServer({\n\t\tserver: http\n\t}), jsgiApp);\n</pre>\n\nLicensing\n--------\n\nThe JSGI-Node package is an implementation of JSGI. JSGI is a standard that was \ndeveloped in collaboration by many developers through the forums of JackJS, \nCommonJS, and Persevere. The implementation in this package is part of the Persevere \nproject, and therefore is licensed under the\nAFL or BSD license. The Persevere project is administered under the Dojo foundation,\nand all contributions require a Dojo CLA.\n\nAuthors include Kris Zyp and Jed Schmidt. ","homepage":"https://github.com/kriszyp/jsgi-node#readme","repository":{"type":"git","url":"git+https://github.com/kriszyp/jsgi-node.git"},"bugs":{"url":"https://github.com/kriszyp/jsgi-node/issues"},"readmeFilename":"README.md"}