{"id":18926798,"url":"https://github.com/ladjs/koa-better-flash","last_synced_at":"2026-03-07T08:03:21.580Z","repository":{"id":66193100,"uuid":"102402923","full_name":"ladjs/koa-better-flash","owner":"ladjs","description":"Flash message middleware for Koa and Passport","archived":false,"fork":false,"pushed_at":"2020-02-20T17:39:11.000Z","size":66,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-17T20:01:10.505Z","etag":null,"topics":["cookie","cookies","flash","info","koa","messages","messaging","node","passport","queue","redis","sessions"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ladjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-04T21:11:05.000Z","updated_at":"2022-03-17T19:28:12.000Z","dependencies_parsed_at":"2023-02-24T08:45:19.049Z","dependency_job_id":null,"html_url":"https://github.com/ladjs/koa-better-flash","commit_stats":null,"previous_names":["niftylettuce/koa-better-flash"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ladjs/koa-better-flash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladjs%2Fkoa-better-flash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladjs%2Fkoa-better-flash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladjs%2Fkoa-better-flash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladjs%2Fkoa-better-flash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ladjs","download_url":"https://codeload.github.com/ladjs/koa-better-flash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladjs%2Fkoa-better-flash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cookie","cookies","flash","info","koa","messages","messaging","node","passport","queue","redis","sessions"],"created_at":"2024-11-08T11:17:12.317Z","updated_at":"2026-03-07T08:03:21.549Z","avatar_url":"https://github.com/ladjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koa-better-flash\n\n[![build status](https://semaphoreci.com/api/v1/niftylettuce/koa-better-flash/branches/master/shields_badge.svg)](https://semaphoreci.com/niftylettuce/koa-better-flash)\n[![code coverage](https://img.shields.io/codecov/c/github/niftylettuce/koa-better-flash.svg)](https://codecov.io/gh/niftylettuce/koa-better-flash)\n[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://github.com/lassjs/lass)\n[![license](https://img.shields.io/github/license/niftylettuce/koa-better-flash.svg)](\u003c\u003e)\n\n\u003e Flash message middleware for Koa and Passport\n\n\n## Table of Contents\n\n* [Install](#install)\n* [Usage](#usage)\n* [Contributors](#contributors)\n* [License](#license)\n\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install koa-better-flash\n```\n\n[yarn][]:\n\n```sh\nyarn add koa-better-flash\n```\n\n\n## Usage\n\n```js\nconst Koa = require('koa');\nconst Router = require('koa-router');\nconst session = require('koa-generic-session');\nconst flash = require('koa-better-flash');\n\nconst app = new Koa();\nconst router = new Router();\n\nrouter.post('/', (ctx, next) =\u003e {\n  // you can also pass an array of messages:\n  // ctx.flash('info', [ 'hi', 'hello', 'good morning' ]);\n  ctx.flash('info', 'hello world');\n  ctx.status = 200;\n});\n\nrouter.get('/', ctx =\u003e {\n  // to get all messages by type simply call `ctx.flash()`\n  ctx.body = ctx.flash('info');\n  // outputs: [ 'hello world ']\n});\n\napp.keys = [ 'keys' ];\napp.use(session());\napp.use(flash());\napp.use(router.routes());\napp.listen();\n```\n\n\n## Contributors\n\n| Name           | Website                    |\n| -------------- | -------------------------- |\n| **Nick Baugh** | \u003chttp://niftylettuce.com/\u003e |\n\n\n## License\n\n[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/)\n\n\n## \n\n[npm]: https://www.npmjs.com/\n\n[yarn]: https://yarnpkg.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladjs%2Fkoa-better-flash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fladjs%2Fkoa-better-flash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladjs%2Fkoa-better-flash/lists"}