Based on https://github.com/gathertown/door-by-api
npm install -g serverless
serverless invoke local --function currentTime
In order to deploy the endpoint, simply run:
serverless deploy
For the frontend in client/dist
(uploaded to S3), run:
serverless client deploy
You need to set a config.js
in the root folder:
module.exports = {
ROOM_ID: 'space\\id',
MAP_ID: 'room-name',
API_KEY: 'api-key',
DOOR_IMAGES: {
open: 'open-url',
closed: 'close-url',
closed_highlight: 'close-highlight-url',
},
DOOR_POS: {
x: x-pos,
y: y-pos
},
PASSWORD: 'password',
};
...and a hint.js
in client/dist:
const passwordHint = '12345';