1.0.4 ā€¢ Published 3 years ago

nxr v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

A tiny api router for your next.js project. It turns your api routes to express route like syntax

šŸ  Homepage

Install

npm install nxr

Usage

In your pages/api folder create a file called [...all].js or [...all].ts if using typescript and copy below to the file.

import router from "nxr";

router.get("/", (req, res) => {
  res.send({ ok: 1 });
});

export default router.handler;

How it works?

It takes advantage of next.js catch all routes and parse and bind function to the route.

Author

šŸ‘¤ Shahid Kamal

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

6 years ago