
_restr_ is a small application which makes it super-easy to define your own
restfull services. API endpoints are defined in a language-neutral JSON format,
and the implementation is as simple as exporting a set of functions.

:warning: _restr_ is still in development. New features will be added in upcoming releases.

Install globally with:

```
npm i -g restr
```

## Roadmap

The following features will be added in an upcoming release:
 
 - Watching for changes 
 - Auto-validation before dispatching to controller

See the [first milestone](https://github.com/OrionGroup/node-restr/milestone/1) for details.

## QuickStart

Let's create a mock service which tells the consumer that his user was successfully created:

**api.json**
```json
{
  "name": "my-service",
  "version": "1",
  "endpoints": {
    "POST /users": "createNewUser",
    "GET /user/:name": "fetchUserInfo"
  }
}
```

**controllers.js**
```js
export function createNewUser(params) {
  return { created: true }
}
```

Next, let's run our service.

```
$ restr
```

_restr_ will automatically notify when a certain controller was not found.

See the [examples/](http://github.com/OrionGroup/node-restr/tree/master/examples/) directory for a full setup.

