API working with Express JS and sending response via JSON format
Call the API using these endpoints:
| Path | HTTP Verb | Action |
|---|---|---|
| /search | GET | index |
| /search/person/:name | GET | |
| /search/address/:postcode | GET | |
| /search/house/:houseName | GET | |
| /search/neighbors?age&numOfHouseHold | GET |
It response in json format:
1- Req: get(/search/person/:name)
Res: {
name: "Micheal",
age: 23,
numberOfHouseHold: 2,
postcode: "2xb 11wr"
}
2- Req: get(search/address/:postcode)
Res: {
buildingName: "New Court",
buildingNumber: 23,
numberOfHousehold: 15
}
