{"_id":"express-flash","_rev":"26-e2fc96ec92e8d735cce281f4499676c6","name":"express-flash","description":"Flash Messages for your Express Application","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.2":{"name":"express-flash","version":"0.0.2","description":"Flash Messages for your Express Application","homepage":"https://github.com/RGBboy/express-flash","keywords":["express","flash","messages"],"author":{"name":"RGBboy","email":"me@rgbboy.com"},"repository":{"type":"git","url":"http://github.com/RGBboy/express-flash"},"main":"index","engines":{"node":">= 0.8.0"},"dependencies":{"connect-flash":"0.1.x"},"devDependencies":{"express":"3.x.x","jade":"0.x.x","mocha":"1.x.x","superagent":"0.x.x","should":"1.x.x"},"scripts":{"test":"make test","unit":"make unit","spec":"make spec"},"readme":"# Express Flash\n\n  Flash Messages for your Express Application\n\n  [![Build Status](https://secure.travis-ci.org/RGBboy/express-flash.png)](http://travis-ci.org/RGBboy/express-flash)\n\n  Flash is an extension of `connect-flash` with the ability to define a flash message\n  and render it without redirecting the request.\n\n## Installation\n\n  Works with Express 3.x.x\n\n    npm install git://github.com/RGBboy/express-flash.git\n\n\n## Usage\n\n  Set it up the same way you would `connect-flash`:\n\n``` javascript\n  var flash = require('express-flash'),\n      express = require('express'),\n      app = express();\n\n  app.use(express.cookieParser('keyboard cat'));\n  app.use(express.session({ cookie: { maxAge: 60000 }}));\n  app.use(flash());\n```\n\nUse `req.flash()` in your middleware\n\n``` javascript\n  app.get('/', function (req, res) {\n    req.flash('info', 'Welcome');\n    res.render('index', {\n      title: 'Home'\n    })\n  });\n  app.get('/addFlash', function (req, res) {\n    req.flash('info', 'Flash Message Added');\n    res.redirect('/');\n  });\n```\n\nAccess the messages in your views via `locals.messages` (.jade in this case):\n\n``` jade\n  - if (messages.info)\n    .message.info\n      span= messages.info\n```\n\n## Requires\n\n  * cookieParser\n  * session\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 RGBboy &lt;me@rgbboy.com&gt;\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.","readmeFilename":"readme.md","_id":"express-flash@0.0.2","dist":{"shasum":"23d1a8bcf3f90d707928e489f96869ecad0acda2","tarball":"https://registry.npmjs.org/express-flash/-/express-flash-0.0.2.tgz","integrity":"sha512-QVUR0ZZRCaa8+iPHoUQaQJrQWcQuK/Q+19M7IUIdIEtvwhrA/ifHT7y1CVJI41YfGiOQnbGtn3uvd2vOdgu58A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIET+2uHtQsuNe9TVo7TNMKTuwRfG4+dxlupYnuirVLJOAiAUc9v0CE3f9W8zK+IjCHmlnb0JT1ChdlQeWbe6Ffzeig=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"rgbboy","email":"me@rgbboy.com"},"maintainers":[{"name":"rgbboy","email":"me@rgbboy.com"}],"directories":{}}},"readme":"# Express Flash\n\n  Flash Messages for your Express Application\n\n  [![Build Status](https://secure.travis-ci.org/RGBboy/express-flash.png)](http://travis-ci.org/RGBboy/express-flash)\n\n  Flash is an extension of `connect-flash` with the ability to define a flash message\n  and render it without redirecting the request.\n\n## Installation\n\n  Works with Express 3.x.x\n\n    npm install git://github.com/RGBboy/express-flash.git\n\n\n## Usage\n\n  Set it up the same way you would `connect-flash`:\n\n``` javascript\n  var flash = require('express-flash'),\n      express = require('express'),\n      app = express();\n\n  app.use(express.cookieParser('keyboard cat'));\n  app.use(express.session({ cookie: { maxAge: 60000 }}));\n  app.use(flash());\n```\n\nUse `req.flash()` in your middleware\n\n``` javascript\n  app.get('/', function (req, res) {\n    req.flash('info', 'Welcome');\n    res.render('index', {\n      title: 'Home'\n    })\n  });\n  app.get('/addFlash', function (req, res) {\n    req.flash('info', 'Flash Message Added');\n    res.redirect('/');\n  });\n```\n\nAccess the messages in your views via `locals.messages` (.jade in this case):\n\n``` jade\n  - if (messages.info)\n    .message.info\n      span= messages.info\n```\n\n## Requires\n\n  * cookieParser\n  * session\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 RGBboy &lt;me@rgbboy.com&gt;\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.","maintainers":[{"name":"rgbboy","email":"me@rgbboy.com"}],"time":{"modified":"2022-06-17T22:17:42.987Z","created":"2013-07-13T22:24:13.199Z","0.0.2":"2013-07-13T22:24:15.103Z"},"author":{"name":"RGBboy","email":"me@rgbboy.com"},"repository":{"type":"git","url":"http://github.com/RGBboy/express-flash"},"users":{"arashmilani":true,"snowdream":true,"monjer":true,"asm2hex":true,"spad":true,"chirag8642":true,"evdokimovm":true,"ilwinzamorag":true,"charlietango592":true,"leapm":true,"ui5flow":true,"docx":true,"rossdavis":true,"he313572052":true,"tranceyos2419":true,"mohokh67":true,"henriesteves":true}}