- From the terminal: Run npm install
- From the terminal: run
node server - In a browser, go to http://localhost:8080/
run node seed-db.js to refresh database with what is in seed-data.json.
- Response
[
{
"id": "5b7755a6200e6a03750db70a",
"name": "Sapphire Hotel",
"address": "5008 SE Hawthorne Blvd, Portland, OR 97215",
"hours": "Daily 4-6 pm, Sunday-Thursday 10pm-close",
"description": "$2 Pabst, $4 wells, $5 wine, $6 cocktails, $3-7 menu"
},
...
- Request
{
"name": "testBar",
"address": "123 Main st",
"hours": "Mon- Fri 4-6pm",
"description": "$1 off dranks"
}
- Response
{
"id": "5b775791be961107269f2fa8",
"name": "testBar",
"address": "123 Main st",
"hours": "Mon- Fri 4-6pm",
"description": "$1 off dranks"
}
1 or all fields can be updated, example:
- Request
{
"name": "testBarUpdated",
"description": "this changed"
}
- Response
{
"id": "5b775791be961107269f2fa8",
"name": "testBarUpdated",
"address": "123 Main st",
"hours": "Mon- Fri 4-6pm",
"description": "this changed"
}
- Response
204 No Content