git clone git@github.com:stro1996/testNodeJs.git
Install mongDB: https://www.mongodb.com/
brew services start mongo || mongod
npm install ( need node 8.0.0)
npm start
Header: {
Accept : application/json
Content-Type: application/json
}
General Error:
status: 401 body : Unauthorized
status: 404 body: "url": … not found"
boddy: {
fullName: required,
email: required,
password: required
}
response:
status: 200
body: {
token
}
body: {
email: required,
password: required
}
response:
status: 200
body: {
token
}
body: {
name (String): required,
discription (String): required,
price (Number): required,
categories (String): required,
}
response: status 200
response
status: 200
body :[
{
name,
discription,
created,
createdBy,
id,
price,
categories
}
]
response
status: 200
body: [
{
name,
discription,
created,
createdBy,
id,
price,
categories
}
]
body: {
id: required,
name,
description,
price,
categories
}
response
status: 200
body : {
newElement: {
name,
discription,
created,
createdBy,
id,
price,
categories,
}
}
body: {
id: required
}
response: status 200