Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asgeir-s/node-express-example
https://github.com/asgeir-s/node-express-example
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/asgeir-s/node-express-example
- Owner: asgeir-s
- Created: 2016-11-03T19:32:07.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-03T20:55:35.000Z (about 8 years ago)
- Last Synced: 2024-04-09T20:00:00.925Z (7 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
1. install node from [here](https://nodejs.org/)
2. run `npm install` from the root folder of the project. To install dependencies.
3. run it with `node app.js`Requests should set:
```
Content-Type: application/json
```
### curl examples
```
curl -H "Content-Type: application/json" localhost:3000/
curl -H "Content-Type: application/json" -X POST -d "{\"make\":\"BMW\",\"model\":2003}" http://localhost:3000/cars
curl -H "Content-Type: application/json" localhost:3000/cars
curl -H "Content-Type: application/json" localhost:3000/cars/1
curl -H "Content-Type: application/json" localhost:3000/users/123xxg
curl -H "Content-Type: application/json" localhost:3000/person
curl -H "Content-Type: application/json" -X POST -d "{\"address\":\"El Street\",\"year\":1988}" http://localhost:3000/house
```