{"_id":"connect-pause","_rev":"2795070","name":"connect-pause","description":"Connect/Express middleware to simulate latency for debugging","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"flesler","email":"aflesler@gmail.com"}],"time":{"modified":"2022-07-11T15:50:34.000Z","created":"2013-05-22T19:49:08.579Z","0.1.0":"2013-05-22T19:55:20.623Z","0.1.1":"2013-05-22T19:49:08.579Z"},"users":{},"author":{"name":"Ariel Flesler","email":"aflesler@gmail.com"},"repository":{"type":"git","url":"git://github.com/flesler/connect-pause"},"versions":{"0.1.0":{"name":"connect-pause","author":{"name":"Ariel Flesler","email":"aflesler@gmail.com"},"version":"0.1.0","description":"Connect/Express middleware to simulate latency for debugging","keywords":["connect","express","pause","delay","latency"],"license":"MIT","repository":{"type":"git","url":"git://github.com/flesler/connect-pause"},"main":"./index.js","engines":{"node":"*"},"dependencies":{},"_id":"connect-pause@0.1.0","dist":{"shasum":"0fd77bd9ef8ba60d0a270ee52313b3dad46c412a","size":1690,"noattachment":false,"key":"/connect-pause/-/connect-pause-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/connect-pause/download/connect-pause-0.1.0.tgz"},"maintainers":[{"name":"flesler","email":"aflesler@gmail.com"}],"directories":{},"publish_time":1369252520623,"_hasShrinkwrap":false,"_cnpm_publish_time":1369252520623,"_cnpmcore_publish_time":"2021-12-16T21:23:57.864Z"},"0.1.1":{"name":"connect-pause","author":{"name":"Ariel Flesler","email":"aflesler@gmail.com"},"version":"0.1.1","description":"Connect/Express middleware to simulate latency for debugging","keywords":["connect","express","pause","delay","latency"],"license":"MIT","repository":{"type":"git","url":"git://github.com/flesler/connect-pause"},"main":"./index.js","engines":{"node":"*"},"dependencies":{},"_id":"connect-pause@0.1.1","dist":{"shasum":"b269b2bb82ddb1ac3db5099c0fb582aba99fb37a","size":1687,"noattachment":false,"key":"/connect-pause/-/connect-pause-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/connect-pause/download/connect-pause-0.1.1.tgz"},"maintainers":[{"name":"flesler","email":"aflesler@gmail.com"}],"directories":{},"publish_time":1369252148579,"_hasShrinkwrap":false,"_cnpm_publish_time":1369252148579,"_cnpmcore_publish_time":"2021-12-16T21:23:58.042Z"}},"readme":"Connect Pause\n=============\n\nConnect/Express middleware to simulate latency for debugging\n\nInstallation\n===\n\n    npm install connect-pause\n\nUsage\n===\n\nPause all [Connect](http://github.com/senchalabs/connect) requests:\n\n    var connect = require('connect'),\n        pause = require('connect-pause');\n\n    Connect.createServer(\n        pause(1000),\n        function(req, res, next){\n            res.writeHead(200, {'Content-Type':'text/plain'});\n            res.end('Waited 1 second');\n        }\n    ).listen(8080);\n\nPause all [Express](https://github.com/visionmedia/express) requests:\n\n \tvar express = require('express'),\n        pause = require('connect-pause');\n\n    var app = express();\n    app.use(pause(1000));\n\tapp.get('/', function(req, res){\n\t\tres.send('Waited 1 second');\n\t});\n\tapp.listen(3000);\n\nPause a single [Express](https://github.com/visionmedia/express) endpoint:\n\n \tvar express = require('express'),\n        pause = require('connect-pause');\n\n    var app = express();\n\tapp.get('/', pause(1000), function(req, res){\n\t\tres.send('Waited 1 second');\n\t});\n\tapp.listen(3000);\n\nPass an error to be returned after the delay:\n\n \tvar express = require('express'),\n        pause = require('connect-pause');\n\n    var app = express();\n\tapp.get('/', pause(1000, new Error('Send 500')), function(req, res){\n\t\tres.send('Waited 1 second');\n\t});\n\tapp.listen(3000);\n\nWhen to use\n===\n\nThis middleware is meant to be used while developing and in need to simulate latency for certain requests or all.\n\nLicense \n===\n\n(The MIT License)\n\nCopyright (c) 2013 Ariel Flesler\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_attachments":{},"license":"MIT"}