gulp serve
gulp
orgulp build
to build an optimized version of your application in/dist
gulp serve
to launch a browser sync server on your source filesgulp serve:dist
to launch a server on your optimized applicationgulp test
to launch your unit tests with Karmagulp test:auto
to launch your unit tests with Karma in watch modegulp protractor
to launch your e2e tests with Protractorgulp protractor:dist
to launch your e2e tests with Protractor on the dist files
More information on the gulp tasks in this README.md.
node server.js
Sign In
Credentials:
- shipper individual -
{"email": "[email protected]","password": "qwerty123"}
- transport provider -
{"email": "[email protected]","password": "qwerty123"}
Url: `http://localhost:4444/api/v1/login`
Method: POST
Body: {
"email": "[email protected]",
"password": "qwerty123"
}
------------
Response: {
"token": "098f6bcd4621d373cade4e832627b4f6"
}
Get Logged User
Url: `http://localhost:4444/api/v1/users`
Method: GET
Header: {token: '098f6bcd4621d373cade4e832627b4f6'}
------------
Response:{
"_id": "52da83a90870ded67d00012b",
"__v": 83,
"firstname": "Kirill",
"lastname": "Zhurin",
"email": "[email protected]",
"username": "kirillzhurin",
"provider": 1,
"type": "sheeper",
"role": "owner",
"image": "http://petapixel.com/assets/uploads/2011/08/face1.jpg",
"fullname": "Kirill Zhurin",
"about": "I'm one of the developers of this app! Too!",
"activate": true
}
Logout
Url: `http://localhost:4444/api/v1/logout`
Method: GET
Header: {token: '098f6bcd4621d373cade4e832627b4f6'}
------------
Response:{status: "ok"}
Get all deliveries
Url: `http://localhost:4444/api/v1/deliveries`
Method: GET
Header: {token: '098f6bcd4621d373cade4e832627b4f6'}
------------
Response:[
{
"id": "583617",
"name": "iMac",
"pickup_date": "02-02-2015",
"category": "office",
"images": [
"http://images.techhive.com/images/article/2014/01/imac2013-front-100225478-orig.jpg",
"http://images.anandtech.com/doci/7365/iMacs_678x452.jpeg"
]
}
]
Get deliveries with filter
Possible categories:
- office
- toys
Url: `http://localhost:4444/api/v1/deliveries`
Method: GET
Header: {token: '098f6bcd4621d373cade4e832627b4f6'}
Params:{
category:"office"
pickup_date:"02-02-2015"
limit:10
skip:0
}
------------
Response:[
{
"id": "583617",
"name": "iMac",
"pickup_date": "02-02-2015",
"category": "office",
"images": [
"http://images.techhive.com/images/article/2014/01/imac2013-front-100225478-orig.jpg",
"http://images.anandtech.com/doci/7365/iMacs_678x452.jpeg"
]
}
]