You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
7 years ago | |
|---|---|---|
| .. | ||
| .gitkeep | 7 years ago | |
| README.md | 7 years ago | |
README.md
Homework
Finish today's labs
Stretch
Once the labs are complete, implement a show route (find()) for People (/people/:id), Locations (/locations/:id), Companies (/companies/:id). Each route should return JSON to the client for only the specified person, location, or company in the DB. For example, a call to /locations/1 would return something like:
{
"id":1,
"street":"123 Fake Street",
"city":"Awesometown",
"state":"CA"
}
This is different from the index route we wrote in lecture which returns all specified models in the DB in an array. For example:
[
{
"id":1,
"street":"123 Fake Street",
"city":"Awesometown",
"state":"CA"
},
{
"id":2,
"street":"456 Super Circle",
"city":"Funton",
"state":"NY"
},
{
"id":3,
"street":"789 Radical Road",
"city":"Coolburg",
"state":"PA"
}
]
Super Stretch
Add an angular front end. Just drop your files wherever and reference them normally. For instance if you had index.html in the root of the project, you can get to it via http://localhost:8888/index.html app.js would be http://localhost:8888/app.js.