Adding a notion of instances per mapAdding a notion of instances to room

The URL signature becomes:

https://workadventu.re/_/[instance]/[path_to_map.json]

This allows us to create many instances of the same map (and therefore to create several different worlds for different people)

An exit on a map can target another "instance" by passing the "exitInstance" property.
This commit is contained in:
David Négrier 2020-05-23 17:27:49 +02:00
parent 1f2b33baec
commit 2448fef53a
6 changed files with 66 additions and 42 deletions

View file

@ -20,7 +20,8 @@ export class MapController {
getMaps() {
this.App.get("/maps", (req: Request, res: Response) => {
return res.status(OK).send({
mapUrlStart: req.headers.host + "/map/files" + URL_ROOM_STARTED
mapUrlStart: req.headers.host + "/map/files" + URL_ROOM_STARTED,
startInstance: "global"
});
});
}