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.
⚠️ 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 for details.
QuickStart
Let's create a mock service which tells the consumer that his user was successfully created:
api.json
controllers.js
{ return created: true }
Next, let's run our service.
$ restr
restr will automatically notify when a certain controller was not found.
See the examples/ directory for a full setup.