An example for showing scripting on the Web. It is a series of files that progressively do more with canvas, and finally a Node.js server for a simple multi-player stick figure diamond hunt game.
Most of the files are static files happily working off of a local drive or any server.
The multiplayer game needs a server; it's a typical Node.js/Express.js server, so do:
npm install
npm start
admin.html
gives you links to reset the scores, start and stop generating diamonds. config.js
can be set up to only allow these links to work from a certain referer, as a simple authentication mechanism (e.g. use a hidden Moodle page).