12.0.1 • Published 8 months ago

koa-router v12.0.1

Weekly downloads
392,603
License
MIT
Repository
github
Last release
8 months ago

@koa/router

Router middleware for Koa. Maintained by Forward Email and Lad.

build status code style styled with prettier made with lass license

Table of Contents

Features

  • Express-style routing (app.get, app.put, app.post, etc.)
  • Named URL parameters
  • Named routes with URL generation
  • Match routes with specific host
  • Responds to OPTIONS requests with allowed methods
  • Support for 405 Method Not Allowed and 501 Not Implemented
  • Multiple route middleware
  • Multiple and nestable routers
  • async/await support

Migrating to 7 / Koa 2

  • The API has changed to match the new promise-based middleware signature of koa 2. See the koa 2.x readme for more information.
  • Middleware is now always run in the order declared by .use() (or .get(), etc.), which matches Express 4 API.

Install

npm:

npm install @koa/router

Typescript Support

npm install @types/koa__router

API Reference

See API Reference for more documentation.

Contributors

Name
Alex Mingoia
@koajs

License

MIT © Alex Mingoia

12.0.1

8 months ago

11.0.2

8 months ago

12.0.0

2 years ago

11.0.0

2 years ago

11.0.1

2 years ago

10.1.1

3 years ago

10.0.0

4 years ago

9.4.0

4 years ago

9.1.0

4 years ago

9.0.1

4 years ago

8.0.8

4 years ago

8.0.7

4 years ago

8.0.6

4 years ago

8.0.0-alpha.1

6 years ago

7.4.0

6 years ago

7.3.0

7 years ago

7.2.1

7 years ago

5.4.2

7 years ago

7.2.0

7 years ago

7.1.1

7 years ago

5.4.1

7 years ago

7.1.0

7 years ago

5.4.0

8 years ago

7.0.1

8 years ago

5.3.0

9 years ago

7.0.0

9 years ago

6.2.0

9 years ago

6.1.0

9 years ago

6.0.1

9 years ago

6.0.0

9 years ago

5.2.3

9 years ago

5.2.2

9 years ago

5.2.1

9 years ago

5.2.0

9 years ago

5.1.2

9 years ago

5.1.1

9 years ago

5.1.0

9 years ago

5.0.1

9 years ago

5.0.0

9 years ago

4.3.2

9 years ago

4.3.1

9 years ago

4.3.0

9 years ago

4.2.0

9 years ago

4.1.0

9 years ago

4.0.1

9 years ago

0.4.1

9 years ago

4.0.0

9 years ago

3.8.0

9 years ago

3.7.0

10 years ago

3.6.0

10 years ago

3.5.0

10 years ago

3.4.0

10 years ago

3.3.1

10 years ago

3.3.0

10 years ago

3.2.3

10 years ago

3.2.2

10 years ago

3.2.1

10 years ago

3.2.0

10 years ago

3.1.4

10 years ago

3.1.3

10 years ago

3.1.2

10 years ago

3.1.1

10 years ago

3.1.0

10 years ago

3.0.2

10 years ago

3.0.1

10 years ago

3.0.0

10 years ago

2.4.4

10 years ago

2.4.3

10 years ago

2.3.3

10 years ago

2.4.1

10 years ago

2.3.2

10 years ago

2.4.0

10 years ago

2.3.1

10 years ago

2.3.0

10 years ago

2.2.0

10 years ago

2.1.0

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.6.1

10 years ago

1.6.0

10 years ago

1.5.5

11 years ago

1.5.4

11 years ago

1.5.3

11 years ago

1.4.3

11 years ago

1.3.3

11 years ago

1.2.3

11 years ago

1.2.2

11 years ago

1.1.2

11 years ago

1.1.1

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago