0.1.3 • Published 4 years ago

paper-wrapper v0.1.3

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Paper Wrapper

Paper wrapper is a library used for being able to easily create REST API's using express, it can also be used as middleware for express.

Goal

The goal of paper wrapper is to be able to create very easy and neat REST API's. Paper wrapper does this by wrapping around express and using 'modules', 'module methods' and 'module requests'.

Installation

Paper wrapper is currently available on the NPM registry and can be installed in your project using:

$ npm install paper-wrapper

or

$ yarn add express

Examples

You can find examples on how to use paper wrapper in the github repository.

Documentation

Full documentation for paper wrapper is available at the projects's github wiki.

Key Theories

In paper wrapper there are a couple of key theories that need to be understood beforehand so it will be easier to use:

Module methods

The module method is the definition of the last part of an endpoint (/api/module/method). The module method contains the handling of the request and sending the response.

Modules

Modules are in fact a bunch of module methods grouped together by name. Modules can have parents so it is easy to create very specific endpoints.

Module request

A module request is the request that is actually being made from the client. The module request contains a couple of properties that gives you more control over the request.

Tests

To run the tests for paper wrapper you first need to install all needed npm packages using:

$ npm install

then

$ npm test

to run actually run the tests. When this command is ran all tests should pass, if not please contact the project owner.

Contribute

If you have any features that you would like to see in paper wrapper that are not currently available, please contribute to the project and create a pull request.

License

Apache 2.0 LICENSE

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

5 years ago

0.0.56

5 years ago

0.0.55

5 years ago

0.0.54

5 years ago

0.0.52

5 years ago

0.0.5

5 years ago