Nextjs loop through all available API routes #14299
Answered
by
cristiand391
Prottoy2938
asked this question in
Help
-
Nextjs creates API endpoints from |
Beta Was this translation helpful? Give feedback.
Answered by
cristiand391
Jun 18, 2020
Replies: 1 comment
-
Yep, you can use the file system API to read all the filenames and create an url for each endpoint. I've written an example here, feel free to check it: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Prottoy2938
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, you can use the file system API to read all the filenames and create an url for each endpoint.
I've written an example here, feel free to check it:
https://github.com/cristiand391/nextjs-loop-api-endpoints