- This project uses Node v16
- Install dependencies
npm install
- Start the API
npm run start-be
- Start the dev server for the React frontend
npm run start
- Running the tests in watch mode
npm run test
Some considerations
- The API may fail anytime
- The API may take up to 3 seconds to respond
Returns a list of cars
[
{
"id": 1,
"make": "Mercedes-Benz",
"model": "E-Class",
"year": 1990,
"color": "#2e904d",
"thumbnail": "http://dummyimage.com/174x138.png/cc0000/ffffff",
"starred": false,
},
{...}
{
"id": 25,
"make": "Suzuki",
"model": "Grand Vitara",
"year": 2005,
"color": "#f16882",
"thumbnail": "http://dummyimage.com/216x187.png/dddddd/000000",
"starred": true,
},
];
Returns a car details
{
"id": 123,
"make": "Jeep",
"model": "Compass",
"year": 2010,
"color": "#19b4b3",
"thumbnail": "http://dummyimage.com/101x229.png/5fa2dd/ffffff",
"starred": false
}
Return the modified car
Body
{
starred: true | false;
}
Returns a list of restaurants with delivery area info
[
{
"id": 136539,
"name": "Pizzería Squzi",
"allCategories": "Empanadas,Pizzas,Tartas,Pastas",
"ratingScore": 4.42,
"deliveryTime": "Entre 30' y 45'",
"shippingAmount": 89,
"discount": 0,
"isNew": false,
"logo": "pizzeria-squzi.jpg",
"opened": true,
},
{...},
{
"id": 106513,
"name": "El Noble Barrio Norte 2",
"allCategories": "Pizzas,Empanadas,Tartas,Postres,Cafetería",
"ratingScore": 4.54,
"deliveryTime": "Entre 30' y 45'",
"shippingAmount": 79,
"discount": 0,
"isNew": false,
"logo": "el-noble-barrio-norte-2.jpg",
"opened": false,
},
];
Returns a list of restaurants with delivery area ID
[
{
"id": 136539,
"name": "Pizzería Squzi",
"allCategories": "Empanadas,Pizzas,Tartas,Pastas",
"ratingScore": 4.42,
"discount": 0,
"isNew": false,
"logo": "https://source.unsplash.com/random/?food,restaurant",
"opened": true,
"deliveryAreaId": 2
},
{...},
{
"id": 106513,
"name": "El Noble Barrio Norte 2",
"allCategories": "Pizzas,Empanadas,Tartas,Postres,Cafetería",
"ratingScore": 4.54,
"discount": 0,
"isNew": false,
"logo": "https://source.unsplash.com/random/?food,restaurant",
"opened": false,
"deliveryAreaId": 2
},
];
Returns a list of delivery areas
[
{
"id": 1,
"shippingAmount": 68,
"deliveryTime": "Entre 20' y 25'"
},
{...},
{
"id": 30,
"shippingAmount": 32,
"deliveryTime": "Entre 10' y 15'"
}
];