This module will display business detail and photo information
Please run the following scripts to start this service:
npm install
: Install all required dependenciesnpm run seed
: Insert 400 mock items into database (business, photo)npm run unseed
: Remove all items from databasenpm test:desc
: Run all tests with descriptions
URL: /biz/:bId
Description: This example retrieves current business detail of the specific business page with first 3 photos
API Response:
{
bId: 1,
bizname: 'Taste of Texas',
reviewCount: 1380,
rating: 4.5,
price: '$$$',
category: ['Steakhouses', 'Wine Bars'],
location: {
address1: '10505 Katy Fwy',
address2: 'Ste 2',
city: 'Houston',
state: 'TX',
zipcode: '77024',
neighborhood: 'Memorial',
latitude: 29.7827412984213,
longitude: -95.556758998672,
},
phone: '(713) 932-6901',
url: 'tasteoftexas.com',
photos: [
1, 2, 3,
],
}
URL: /biz_photos/:bId/:pId
Description: This example retrieves 10 photo objects of current business on the business page with it’s related business Id.
API Response:
[
{
pId: 1,
imgUrl: 'J3kWrFK9vE5oBgREBJ1YQg/ls.jpg',
uId: 1,
bId: 1,
text: '38oz!!!!!',
tag: 'Tomahawk Ribeye',
},
photo2_obj,
photo3_obj,
...,photo10_obj
]
URL: /biz_photo/:bId/:pId
Description: This example retrieves one photo for current business on the business page with it’s related bId
API Response:
{
pId: 1,
imgUrl: 'J3kWrFK9vE5oBgREBJ1YQg/ls.jpg',
uId: 1,
bId: 1,
text: '38oz!!!!!',
tag: 'Tomahawk Ribeye',
}
URL: /biz_dishes/:bId/:dishes
Description: This example retrieves the first photo and total photo counts in relation to menu item.
API Response:
[
{
"imgUrl": "J3kWrFK9vE5oBgREBJ1YQg/ls.jpg",
"photoCount": 1,
"dish": "Tomahawk Ribeye"
},
{
"imgUrl": "L38qQjyzPvt53aJ5sTj4sg/ls.jpg",
"photoCount": 1,
"dish": "Center Cut Filet"
}
]
An nvmrc
file is included if using nvm.
- Node 10.13.0
- etc
From within the root directory:
npm install -g webpack
npm install