{"full_name":"lukeed/polka","owner":"lukeed","name":"polka","shard":"1","url":"https://github.com/lukeed/polka","description":"A micro web server so fast, it'll make you dance! :dancers:","homepage":"","topics":[],"tag_pages":[],"language":"JavaScript","license":"MIT","avatar":"https://avatars.githubusercontent.com/u/5855893?u=051e349a2e0f30ca6145a6f73e11aaee09cc5354&v=4","created_at":"2017-12-22T05:55:41Z","pushed_at":"2025-04-09T18:42:18Z","metrics":{"stars":5586,"forks":176,"watchers":68,"issues":157,"prs":73,"releases":21,"issues_open":24,"issues_closed":133,"prs_open":11,"prs_closed":22,"prs_merged":40,"discussions":0},"growth":{"day":{"stars":0,"forks":0,"base_day":"2026-11-15"}},"history":{"dates":["2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[5588,5593,5600,5606,5586,5586,5586],"forks":[176,176,176,176,176,176,176],"watchers":[null,68,68,68,68,68,68],"issues_open":[null,24,24,24,24,24,24],"prs_open":[null,11,11,11,11,11,11]},"boards":{},"same_owner":[{"full_name":"lukeed/clsx","name":"clsx","shard":"1","boards":{}}],"issues":[{"number":17,"title":"TypeScript typings support?","comments":37,"created_at":"2018-01-24T14:37:31Z"},{"number":12,"title":"Why no throwing from middleware?","comments":23,"created_at":"2018-01-20T00:37:37Z"},{"number":14,"title":"Package: Express-like Response Helpers","comments":12,"created_at":"2018-01-21T23:36:10Z"},{"number":107,"title":"Sub-app not working when mounted on \"/\"","comments":11,"created_at":"2019-08-27T12:29:21Z"},{"number":36,"title":"App mount path stripped to a of cardinality of 1","comments":11,"created_at":"2018-03-08T16:54:16Z"},{"number":85,"title":"Build a list of native or Polka-compatible middleware","comments":8,"created_at":"2019-02-01T17:33:07Z"},{"number":77,"title":"next function in single function case","comments":5,"created_at":"2018-12-11T10:56:08Z"},{"number":127,"title":"Make polka ultra light weight","comments":4,"created_at":"2020-02-02T17:41:13Z"}],"discussions":[],"latest_release":{"name":"","tag":"v0.5.0","published_at":"2018-09-18T19:00:59Z","body":"## Breaking\r\n\r\n- Remove Promise around `app.listen` (#19): dc56b9d, e34a2a4\r\n\r\n    The previous `polka.listen` was a Promise & had structured input, both of which made it unique from existing frameworks. However, it was also a gotcha for projects migrating from existing frameworks.\r\n\r\n    Instead, `polka.listen` now passes all arguments directly to the underling `server.listen`, which is arguably more \"in tune\" with the rest of Polka's ideology around native `http` integration.\r\n\r\n    The new method will now rerun the current `Polka` instance directly, allowing you to continue chaining from it, or allowing you to grab the `server` or `handler` values immediately. Previously, `.listen()` ***always*** had to be last in your chain & resolved to nothing.\r\n\r\n  ```js\r\n  // Could not do this before 0.5.0\r\n  const { server, handler } = polka().listen();\r\n\r\n  // Or this!\r\n  const app = polka().listen(PORT, onAppStart);\r\n\r\n  app.use('users', require('./users'))\r\n    .get('/', (req, res) => {\r\n      res.end('Pretty cool!');\r\n    });\r\n  ```\r\n\r\n- Removed built-in `.METHOD()` prototype methods for _all_ **34** `http.METHODS`: 6d5d094\r\n\r\n    The large majority of these are never used; eg: `ACL`, `MKCOL`, `MKCALENDAR`, etc.\r\n\r\n    These HTTP/1.1 verbs are supported / available to your Polka applications:\r\n\r\n    * GET -> `.get()`\r\n    * POST -> `.post()`\r\n    * OPTIONS -> `.options()`\r\n    * DELETE -> `.delete()`\r\n    * PATCH -> `.patch()`\r\n    * PUT -> `.put()`\r\n    * HEAD -> `.head()`\r\n    * CONNECT -> `.connect()`\r\n    * TRACE -> `.trace()`\r\n\r\n\r\n## Features\r\n\r\n- Polka now supports multiple route-specific handlers! (#18): 42574ac, aac1859, a82f571\r\n\r\n    This was the most anticipated & most request feature for Polka 🎉 \r\n\r\n    Put simply, variadic route handlers allows you to chain middleware for specific paths. This was only feasible before through `req.path` filters on sub-application or global middleware. _Routes_ can now be modular, allowing you to compose/reuse your server route-by-route instead of group-by-group.\r\n\r\n    Supporting this dramatically improves compatibility between Express and Polka applications. Most importantly, though, this did not come at the expense of performance~!\r\n\r\n    Here's a very basic example using [`passport`](https://github.com/jaredhanson/passport), which was often a driver for this feature request:\r\n\r\n  ```js\r\n  const app = polka();\r\n\r\n  app.post('/login', \r\n    // This \"guards\" this route, executing first\r\n    passport.authenticate('local', { failureRedirect: '/login' }),\r\n    // This is the \"main\" function of this route\r\n    function (req, res) {\r\n      res.redirect('/');\r\n    });\r\n  ```\r\n\r\n- **NEW** `@polka/url` package: 44a5757, da00320, 87bac82, 17c54a7\r\n     _Super lightweight URL parser built specifically for Node.js servers._\r\n\r\n\r\n## Patches\r\n\r\n- (`send-type`) Lowercase all custom `headers` keys before parsing (#57): 83731c5\r\n\r\n## Examples\r\n\r\n- Added `examples/with-apollo` (#48): a7a38c4\r\n- Added `examples/with-nextjs` (#48): a7a38c4\r\n    _Thanks @jerolan!_\r\n- Update `examples/with-socketio`: a9f0f58\r\n\r\n## Chores\r\n\r\n- Fix README: `req.path` instead of `req.pathname` (#62): a4d96b9\r\n    _Thanks @antoineneff!_\r\n- Add [Middleware Sequence](https://github.com/lukeed/polka#middleware-sequence) documentation: d6296ed\r\n- Update Express comparisons: d6296ed, 99f4fe9\r\n- Misc README changes: 734ee31, 35fb3d8, e43bf6f","is_prerelease":false},"readme":false,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}