Discover last-minute deals on quality restaurant food before it gets thrown out.
- Git
- Node.js v4.2.2+
- Visual Studio Code
Run the following commands in the root directory of this project:
npm install
npm start
Go to http://localhost:3000/ to view the app.
A list of all Node.js API endpoints.
{
"deals": [
{
"_id": "564dedca8946b04417127d07",
"description": "A really tasty hamburger for half the price.",
"discount": "50%",
"image": "https://example.com/image.jpg",
"created": "2015-11-19T15:42:02.152Z",
"when": "2015-11-19T23:00:00.152Z",
"price": "100₪",
"quantity": 25,
"interested": 10,
"title": "220g Hamburger",
"address": "2 Baruc St, Tel Aviv, Israel",
"location": [
32.072176,
34.808871
]
}
]
}
{
"deal":
{
"_id": "564dedca8946b04417127d07",
"description": "A really tasty hamburger for half the price.",
"discount": "50%",
"image": "https://example.com/image.jpg",
"created": "2015-11-19T15:42:02.152Z",
"when": "2015-11-19T23:00:00.152Z",
"seller": "Rak Basar",
"price": "100₪",
"quantity": 25,
"interested": 10,
"title": "220g Hamburger",
"address": "2 Baruc St, Tel Aviv, Israel",
"location": [
32.072176,
34.808871
]
}
}
{
"success": true
}
{
"success": true
}
{
"location":
{
"lat": 34.3984,
"lng": 36.34198,
},
"radius": 10 // km
}
{
"deals": [
{
"_id": "564dedca8946b04417127d07",
"description": "A really tasty hamburger for half the price.",
"discount": "50%",
"image": "https://example.com/image.jpg",
"created": "2015-11-19T15:42:02.152Z",
"when": "2015-11-19T23:00:00.152Z",
"seller": "Rak Basar",
"price": "100₪",
"quantity": 25,
"interested": 10,
"title": "220g Hamburger",
"address": "2 Baruc St, Tel Aviv, Israel",
"location": [
32.072176,
34.808871
]
}
]
}
{
// minimum one parameter
// text: title or description
// location: choose either lat+lng or address
"location": {"radius" : 10, // radius in KM
"address" : "6 Baruc St, Tel Aviv, Israel",
"lat": 34.3984,
"lng": 36.34198,
},
"text": "Hamburger",
"seller": "Moses",
"time_range" : ["22:42",
"23:42"]
}
{
"deals": [
{
"_id": "564dedca8946b04417127d07",
"description": "A really tasty hamburger for half the price.",
"discount": "50%",
"seller": "Rak Basar",
"image": "https://example.com/image.jpg",
"created": "2015-11-19T15:42:02.152Z",
"when": "2015-11-19T23:00:00.152Z",
"price": "100₪",
"quantity": 25,
"interested": 10,
"title": "220g Hamburger",
"address": "2 Baruc St, Tel Aviv, Israel",
"location": [
32.072176,
34.808871
]
}
]
}
//mandatories: title, seller, quantity, address, price, when
{
"title": "220g Hamburger",
"description": "A really tasty hamburger for half the price.",
"discount": "50%",
"seller": "Rak Basar",
"price": "100₪",
"quantity": 25,
"when": "23:00",
"image": "https://example.com/image.jpg",
"address": "2 Baruc St, Tel Aviv, Israel"
}
{
"success": true
}
- Login/Register