0.4.0 • Published 6 years ago

@orchejs/rest v0.4.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Orchejs REST

npm version Build Status Coverage Status

Create REST APIs in Node.js using Typescript Decorators with lots of utilities that will make your code cleaner and boost your productivity.



About Orchejs

The Orchejs project provides a set of libraries aggregating key technologies and consolidated libraries for APIs development in Node.js.

The goal is to make the backend development in Node.js even more productive, organized and that promotes scalability and maintainability.

Orchejs REST

Use this library to create your REST APIs in Node.js and take advantage of the following benefits:

  • Simple server configuration and setup.
  • Type checking from Typescript.
  • Clean and organized code.
  • Decorators to specify your endpoints, query, path params and properties.
  • Validators.
  • Request and Response generic classes.
  • Interceptors to manipulate your requests and hooks.
  • API Logging.

App Generator

The easiest way to start with orchejs rest is by using the yeoman generator.

First be sure that you have yeoman installed as a global dependency:

npm install -g yo

Then install the generator-orchejs-rest package as global:

npm install -g generator-orchejs-rest

The next step is to create the app using the generator-orchejs-rest package.

Quick start

If you don't want to use the yeoman generator and decide to build your app from scratch, follow this quickstart.

Installation

Installation, without CORS support:

With yarn:

yarn add @orchejs/rest express body-parser 

With npm:

npm install --save @orchejs/rest express body-parser

And if you need CORS:

With yarn:

yarn add cors

With npm:

npm install --save cors

Setup

Enable experimentalDecorators and emitDecoratorMetadata compiler options in tsconfig.json.

tsconfig.json example:

{
  "compilerOptions": {
    "target": "es6",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true
  }
}

Documentation

// TODO: add documentation

Contributing

If you want to contribute to the project, please check out the contributing document.

Thanks for supporting Orchejs!

Contact

// TODO: add documentation

License

MIT License

Copyright (c) 2017 Mauricio Gemelli Vigolo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.4.0

6 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago