# express-easy-rest

> express-easy-rest

Latest version **1.1.1** (published 2016-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install express-easy-rest
pnpm add express-easy-rest
yarn add express-easy-rest
bun add express-easy-rest
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2016-10-26 |
| First published | 2016-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 11 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Komarov Egor |
| Maintainers | odrin |
| Keywords | node, express, rest, rest api, typescript |

## Links

- npm: https://www.npmjs.com/package/express-easy-rest
- Repository: https://github.com/Odrin/express-easy-rest
- Homepage: https://github.com/Odrin/express-easy-rest#readme
- Issues: https://github.com/Odrin/express-easy-rest/issues
- npm.io page: https://npm.io/package/express-easy-rest

## Dependencies (11)

- [glob](https://npm.io/package/glob.md) 7.x
- [@types/glob](https://npm.io/package/@types/glob.md) 5.x.x
- [@types/mime](https://npm.io/package/@types/mime.md) 0.0.29
- [@types/node](https://npm.io/package/@types/node.md) 6.x.x
- [@types/express](https://npm.io/package/@types/express.md) 4.x.x
- [@types/jasmine](https://npm.io/package/@types/jasmine.md) 2.x.x
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) 0.x
- [@types/body-parser](https://npm.io/package/@types/body-parser.md) 0.0.33
- [@types/serve-static](https://npm.io/package/@types/serve-static.md) 1.x.x
- [@types/reflect-metadata](https://npm.io/package/@types/reflect-metadata.md) 0.0.5
- [@types/express-serve-static-core](https://npm.io/package/@types/express-serve-static-core.md) 4.x.x

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2016-10-26
- 1.1.0 — 2016-10-24
- 1.0.0 — 2016-10-19
- 0.3.2 — 2016-08-31
- 0.3.1 — 2016-08-30
- 0.3.0 — 2016-08-26
- 0.2.2 — 2016-08-22
- 0.2.1 — 2016-08-19
- 0.1.0 — 2016-08-08

## README

[![npm version](https://badge.fury.io/js/express-easy-rest.svg)](https://badge.fury.io/js/express-easy-rest) [![Build Status](https://travis-ci.org/Odrin/express-easy-rest.svg?branch=master)](https://travis-ci.org/Odrin/express-easy-rest)

#express-easy-rest
Simple and easy, [express](https://github.com/expressjs/express/) based, charged with power of TypeScript, REST API framework.

```TypeScript
class App extends ApplicationInstance {
  
}

export = new App();
```
```TypeScript
@Controller({basePath: '/book'})
export class BookController extends ApiController {
  private books: Book[] = [...];

  @Get('/list')
  getBooks(): Promise<Book[]> {
    return new Promise((resolve: any) => {
      setTimeout(() => resolve(this.books), 3000); // here your async db call or anything else
    });
  }
}
```
```JavaScript
var express = require('express');
var app = require('./app');

express()
  .use('/api', app.middleware())
  .listen(8000);
```
>Simple things should be simple, complex things should be possible | Alan Kay

##Installation
```bash
npm install express-easy-rest
```

##Simple tsconfig.json
```JavaScript
{
  "compilerOptions": {
    "target": "ES6",
    "module": "commonjs",
    "moduleResolution": "node",
    "outDir": "./lib",
    "noImplicitAny": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true
  }
}
```

##Examples
You can find more examples [here](src/example).

##Features
* Controller based structure
* Fast and easy decorators syntax
* Scalable and customizable architecture
* Model validation

Any coincidence with asp.net WebAPI platform are accidental... or not.

##Why TypeScript?
TypeScript helps you to create a well-structured, scalable and neat applications with the ability to use the most modern technologies.
Magic of decorators makes your code more flexible and clean, and allows you to pay more attention to what you *want* to do, rather than *how* to do it.

---
_Source: https://npm.io/package/express-easy-rest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
