On 14. 3. 2020 13:06, Zenchess wrote:
> Hi. I was wondering what people use or do to use amber with some
> kind of dynamic webpage. Like say I had a chess webpage, and for every
> game played on the server there would be a unique url with an amber page
> at that url.
The development server `amber serve` actually allows you to test this in
development as it has an option to fallback to serving specific page
instead of 404 when the path does not exist, exactly for this reason
(SPAs with HTML5 routes).
If you load the.js etc. from absolute paths, it should simply work. Then
you can use any routing library out there afaict (there are minimalistic
one, like leviroutes).
And of course, set up your actual deployment configuration to also serve
the proper .html file from nonexistent paths.