There is a nice V2 example from one of the openjscad users here:
https://github.com/sdaau/openjscad_example_selfhost_spa_webpage

maybe this is something you can use ?