{"id":16326683,"url":"https://github.com/chrisyip/express-next","last_synced_at":"2025-07-24T19:05:52.919Z","repository":{"id":33431371,"uuid":"37076680","full_name":"chrisyip/express-next","owner":"chrisyip","description":"A better way to use Express.","archived":false,"fork":false,"pushed_at":"2015-06-26T12:47:16.000Z","size":166,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T22:12:17.655Z","etag":null,"topics":[],"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/chrisyip.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}},"created_at":"2015-06-08T15:50:50.000Z","updated_at":"2016-02-28T15:25:31.000Z","dependencies_parsed_at":"2022-08-29T01:50:35.889Z","dependency_job_id":null,"html_url":"https://github.com/chrisyip/express-next","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fexpress-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fexpress-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fexpress-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fexpress-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisyip","download_url":"https://codeload.github.com/chrisyip/express-next/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235712,"owners_count":22036966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-10T23:09:17.575Z","updated_at":"2025-05-14T22:12:18.144Z","avatar_url":"https://github.com/chrisyip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# express-next\n\n[![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Travis CI][travis-image]][travis-url] [![Coveralls][coveralls-image]][coveralls-url]\n\nA modern way for using Express.\n\nThis package adds the following feature(s) to [Express](http://expressjs.com/):\n\n- [Generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator)\n\n# Environment Requirement\n\n- `node \u003e= 0.12` with `--harmony`\n- `iojs \u003e= 1.0.0`\n- `Express \u003e= 4.5` (only this version tested, should work for `4.x`)\n\n# Usage\n\n```\nnpm install --save express express-next\n```\n\n```js\nconst express = require('express-next')\nconst app = express()\nconst router = express.Router()\n\n// Normal function works as usual\napp.get('/', function (req, res) {\n  res.render('index')\n})\n\napp.use('/users', router)\n\n// Generator function works as well\nrouter.get('/:id', function* (req, res) {\n  let user = yield User.find(req.params.id)\n\n  if (user) {\n    res.locals.user = user\n    res.render('user')\n  } else {\n    // Equals to \"next(new Error(`User ${req.params.id} not found!`))\"\n    throw new Error(`User ${req.params.id} not found!`)\n  }\n})\n```\n\n# Contributors\n\nVia [GitHub](https://github.com/chrisyip/express-next/graphs/contributors)\n\n[npm-url]: https://npmjs.org/package/express-next\n[npm-image]: http://img.shields.io/npm/v/express-next.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/chrisyip/express-next\n[daviddm-image]: https://david-dm.org/chrisyip/express-next.svg?style=flat-square\n[travis-url]: https://travis-ci.org/chrisyip/express-next\n[travis-image]: http://img.shields.io/travis/chrisyip/express-next.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/chrisyip/express-next\n[coveralls-image]: http://img.shields.io/coveralls/chrisyip/express-next.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisyip%2Fexpress-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisyip%2Fexpress-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisyip%2Fexpress-next/lists"}