This is the Backend for the washy scheduling system for washing machines. It's a basic NodeJS instance running Aeolus as a web framework.
To run this server locally you'll need to have NodeJS and npm installed and run:
$ npm install
$ npm start
This repo includes a Dockerfile. To run this inside docker simply use:
$ docker build -t washybackend .
$ docker run -p 8080:8080 washybackend
All the information required to connect to the database should be editable in dburl.js and can be changed to any other MongoDB instance.
To run a MongoDB instance in Docker we recommend:
$ docker run -p 27017:27017 -d mongo
Here is a simplified API reference
returns "Hello" to confirms the server is running.
returns the object of a user corresponding any of the given services.
returns all the possible timeslots for a given day
returns all the state information stored by a bot conversation
will reserve a Machine with the start-date for 2 hours. If succesfull it will return the machine. If not it will return false.
Will add a machine to the room with the given id.
Will check if the person in the image in the url has a reserved machine in the room with the given ID. If that's the case it will return the name of the person. If not it will give a reason for failing.
Will reference the picture in url to the user and train the Faces API.
Will create a user with the name and the phone number and reference them to any other given service id's.
Will store the date and or user and or state information to the state object for persistency in the Bot. It will only override the given attributes and none more.
Will associate any external service id to the user with the number number.