I have an api that can accept all days of a year and return information for all days.
https://api.mywebsite.org/data/all/${month}/${day}
Right now, I have a page called https://mywebsite.org/today which returns info for today.
My goal is to make the page available for all days of the year. For example Feb 28 would be:
https://mywebsite.org/today/feb/28
will pass 02 (month) and 28(day) to the api.
My routes are very simple. For Example for users, my route looks like below but users are stored in a database. I am not guessing or making up values like I want to do for dates.
/user/[userId]/index.js
I can create a route called /today/[date]/index.js but how to create this for all days of the year?
I would like users to be able to just enter any month/day.