https://github.com/rochdev/nodejs-intro-demo
Demo project for the Introduction to Node.js presentation
https://github.com/rochdev/nodejs-intro-demo
Last synced: 8 months ago
JSON representation
Demo project for the Introduction to Node.js presentation
- Host: GitHub
- URL: https://github.com/rochdev/nodejs-intro-demo
- Owner: rochdev
- License: isc
- Created: 2018-03-23T13:42:52.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-28T15:19:59.000Z (about 8 years ago)
- Last Synced: 2025-01-01T07:44:50.922Z (over 1 year ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node.js demo
Demo of Node.js using a minimal server / storage implementation.
## Run locally
```js
npm install
npm start
```
## How to use
### Insert documents
```sh
curl -H 'Content-Type: application/json' -X POST -d '{"name":"alice"}' http://localhost:8080/docs
curl -H 'Content-Type: application/json' -X POST -d '{"name":"bob"}' http://localhost:8080/docs
```
### Find documents
```sh
curl http://localhost:8080 # all documents
curl http://localhost:8080?name=alice # find by property value
```