Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fmvilas/next-route-to-express-route
Converts Next.js routes to Express.js routes.
https://github.com/fmvilas/next-route-to-express-route
express expressjs nextjs nodejs route
Last synced: 5 days ago
JSON representation
Converts Next.js routes to Express.js routes.
- Host: GitHub
- URL: https://github.com/fmvilas/next-route-to-express-route
- Owner: fmvilas
- Created: 2020-05-13T08:16:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T05:46:20.000Z (almost 2 years ago)
- Last Synced: 2024-10-27T20:45:18.085Z (about 2 months ago)
- Topics: express, expressjs, nextjs, nodejs, route
- Language: HTML
- Size: 691 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# next-route-to-express-route
Converts Next.js routes to Express.js routes.
```
npm i next-route-to-express-route
``````js
const { fromNextToExpressRoute } = require('next-route-to-express-route')console.log(fromNextToExpressRoute('/users/[id]/profile'))
// => '/users/:id/profile'
```It works with catch-all routes too:
```js
const { fromNextToExpressRoute } = require('next-route-to-express-route')console.log(fromNextToExpressRoute('/users/[...]'))
// => '/users/*'
```That's it! It's just a simple utility package :ok_hand:
## Author
Fran Mendez • [Twitter](https://twitter.com/fmvilas)
## License
Apache 2.0