13eck
Explore posts from servers❔ Can I serve a static file using a wildcard route?
My thought process was the user would go to
https://example.com/character/38
, it'd give 'em the character.html
page with just the static content, use JS fetch()
to hit the DB endpoints to get JSON data, then use that data to populate the HTML page with the actual info32 replies
❔ Can I serve a static file using a wildcard route?
The route is dynamic only insofar that there's an Id on the end. The character sheet is the same regardless of what character it is, just the details are different. So I want to use one file as the template for the character sheet and then use JS to fetch the character's info from the database and update the page with the appropriate data.
It's like if I did
https://example.com/character?id=38
but with https://example.com/character/38
instead.32 replies