https://github.com/metaory/meta-zd-node-server-poc
Zero Dependency Node Server Challenge
https://github.com/metaory/meta-zd-node-server-poc
challenge coding-challenge
Last synced: 2 months ago
JSON representation
Zero Dependency Node Server Challenge
- Host: GitHub
- URL: https://github.com/metaory/meta-zd-node-server-poc
- Owner: metaory
- Archived: true
- Created: 2019-02-25T01:56:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-25T05:34:16.000Z (over 6 years ago)
- Last Synced: 2024-11-03T03:30:15.335Z (7 months ago)
- Topics: challenge, coding-challenge
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# meta-zd-node-server-poc
Zero Dependency Node Server POC
### :zap: Setup / Run
`npm start`
* * *
#### list users
curl --request GET \
--url http://localhost:3000/api/users* * *
#### get user
curl --request GET \
--url http://localhost:3000/api/users{userId}* * *
#### create user
curl --request POST \
--url http://localhost:3000/api/users \
--header 'content-type: application/json' \
--data ' {
"name": "foo Hilfiger",
"gender": "male",
"email": "[email protected]",
"phone": "+31612345678",
"address": [{
"number": 7,
"street": "Danzigerkade",
"city": "Amsterdam",
"zipcode": "1234 AB"
},{
"number": 10,
"street": "Xorg",
"city": "Arch",
"zipcode": "101 LOL"
}
]
}'* * *
#### update user
curl --request PUT \
--url http://localhost:3000/api/users{userId} \
--header 'content-type: application/json'* * *
#### delete user
curl --request DELETE \
--url http://localhost:3000/api/users{userId}* * *
#### flush database
curl --request DELETE \
--url http://localhost:3000/api/users* * *