Skip to content

e1ferapontov/testNodeJs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

git clone git@github.com:stro1996/testNodeJs.git

Setup

Install mongDB: https://www.mongodb.com/
brew services start mongo || mongod
npm install ( need node 8.0.0)
npm start

Documentation

General Info

Header: {
	Accept : application/json
	Content-Type: application/json
}

General Error:

	status: 401  body : Unauthorized
	status: 404  body: "url": … not found"

POST /auth/register

boddy: {
 	fullName: required,
	email: required,
	password: required
}

response:

	status: 200

	body: {
		token
	}
Example:

Optional Text

POST /auth/sign_in

body: {
	email: required,
	password: required

}

response:
	status: 200
	body: {
		token
	}
Example:

Optional Text

POST /item_card

  body: {
	name (String): required,
  	discription (String): required,
		price (Number): required,
		categories (String): required,
  }

  response: status 200
Example

Optional Text

GET /item_card

response
	status: 200
	body :[
		{
			name,
			discription,
			created,
			createdBy,
			id,
			price,
			categories
		}
	]
Example

Optional Text

GET /item_card/get_my

response
	status: 200
	body: [
		{
			name,
			discription,
			created,
			createdBy,
			id,
			price,
			categories
		}
	]
Example

Optional Text

PUT /item_card

body: {
	id: required,
	name,
	description,
	price,
	categories
}

response
	status: 200
	body : {
		newElement: {
			name,
			discription,
			created,
			createdBy,
			id,
			price,
			categories,
		}
	}
Example

Optional Text

DELETE /item_card

body: {
	id: required
}

response: status 200
Example

Optional Text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.0%
  • HTML 11.8%
  • CSS 6.2%