An open API service indexing awesome lists of open source software.

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

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
```