I have an existing personal web app that is made from vanilla html and javascript (no web framework like react, vue, etc). It uses a parse server backend and provides dynamic (live query) updates.
I use a tournament ID in the JS as the input to queries, saves, etc to a parse server backend. Currently, this is hardcoded into the JS.
I now want to make this dynamic based on the URL. So, for example, if the url is /live/12345/ then 12345 will be used as the tournament ID. I know I can use a router like Express JS to route and extract the param from URL but not clear how to get the parameter into my JS.
If I want to keep my existing html/JS, is it possible to use routing and use the ID parameter in my vanilla JS? I know I could use Express + ejs and then get the ID using something as shown here but can this be done without needing a framework/templating engine?