X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lmno.js;fp=lmno.js;h=1e1d260954d9fa7b71babdadea911fd63162c96e;hb=5c589dc3c8016c2f43174b1cf6de3e934835a142;hp=b6c5b78e04e6b83a6700c19d623a6e55d625f1c8;hpb=c5bdd36586eaa0235fb6822cb4ccb7620e1bb0aa;p=lmno-server diff --git a/lmno.js b/lmno.js index b6c5b78..1e1d260 100644 --- a/lmno.js +++ b/lmno.js @@ -69,6 +69,8 @@ nunjucks.configure("templates", { * * / Serves -game.html template * + * /player Allows client to set name + * * /events Serves a stream of events. Game can override * the handle_events method, call super() first, * and then have code to add custom events. @@ -289,6 +291,12 @@ for (let key in engines) { response.render(`${game.meta.identifier}-game.html`); }); + router.put('/player', (request, response) => { + const game = request.game; + + game.handle_player(request, response); + }); + router.get('/events', (request, response) => { const game = request.game;