Skip to content

Pouleyy/nodeAirBnB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirBnB like in NodeJS

Ingésup project

Features

  • Create user, login (no JWT ATM), update, delete
  • Create location, update, book, get location /w paramaters (price & city)

Prerequisites

Setup (before anything else)

$ npm install
#In order to install all depedencies

Launch

$ npm start
#Launch on port 9000 by default
Populate
  • 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

Endpoint

User

  • Create a user, you need to put his username, password and mail in the body. Username and mail must be unique.
POST : /users
  • 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.
PUT : /users/login

Location

  • Get all location
GET : /location/
  • 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.
POST : /location
  • Get a location by its name
GET : /location/: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

Chat

  • Chat between people
POST : /chat

About

AirBnB-like in NodeJS

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors