Create user, login (no JWT ATM), update, delete
Create location, update, book, get location /w paramaters (price & city)
Setup (before anything else)
$ npm install
# In order to install all depedencies
$ npm start
# Launch on port 9000 by default
At launch it will populate your database /w fake data. All the data are in /helpers in JSON file. It's easier to test /w data in DB
Create a user, you need to put his username, password and mail in the body. Username and mail must be unique.
Update a user, password and surname are in the body. Only surname and password can be modified.
PUT : /users/profile/:username
Log a user, you need to put his username, password and mail in the body.
Get some location /w parameters
GET : /location?city=CityName&price=priceLTE
Create a location, you need to put its name, city, price per night, description and the owner username.
Get a location by its name
Get all location create by a user
GET : /location/owner/:ownername
Book a location for a day
PUT : /location/:name/book/:year/:month/:day