# hinos

> Pure nodejs framework, extreme fast and light weight which is written by typescript

Latest version **2.0.7** (published 2018-04-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install hinos
pnpm add hinos
yarn add hinos
bun add hinos
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.7 |
| Published | 2018-04-06 |
| First published | 2017-05-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 16.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | doanthuanthanh88@gmail.com |
| Maintainers | doanthuanthanh88 |

## Links

- npm: https://www.npmjs.com/package/hinos
- npm.io page: https://npm.io/package/hinos

## Dependencies (2)

- [log4js](https://npm.io/package/log4js.md) ^2.5.3
- [hinos-utils](https://npm.io/package/hinos-utils.md) ^2.0.3

## Recent versions

- 2.0.7 (latest) — 2018-04-06
- 2.0.6 — 2018-04-05
- 2.0.5 — 2018-04-05
- 2.0.4 — 2018-04-04
- 2.0.3 — 2018-04-04
- 2.0.2 — 2018-04-03
- 2.0.1 — 2018-04-03
- 2.0.0 — 2018-04-03
- 2.0.0-alpha1 — 2018-04-03
- 1.2.4 — 2018-03-30
- 1.2.3 — 2018-03-24
- 1.2.2 — 2018-03-24
- 1.2.1 — 2018-03-24
- 1.2.0 — 2018-03-24
- 1.1.6 — 2017-11-17
- … 16 more at https://npm.io/package/hinos/versions

## README

# hinos
Pure nodejs framework, EXTREME FAST and LIGHT WEIGHT. 
It is optimized for large projects. And of course, it get best performance
"hinos" is not bundled with any middleware. 
It's only nodejs native

# Installation
```nodejs  
npm i hinos -S
```

# Examples

### Typescript
```nodejs
import { Server, Context } from 'hinos';

const yourMiddleware = async (ctx: Context, next: Function) => {
    // Return error
    if(ctx.query.isError) ctx.throws(401, 'error');
    // Return data
    ctx.data = {
        msg: 'Hello world!'
    }
    await next();
}

Server.use(yourMiddleware);

Server.listen(1337, () => {
    console.log('Server is listening at port %d', 1337);
});
```

### Nodejs
```nodejs
const hinosserver = require("hinos");
const Server = hinosserver.Server;

const yourMiddleware = async (ctx, next) => {
    // Return error
    if(ctx.query.isError) ctx.throws(401, 'error');
    // Return data
    ctx.data = {
        msg: 'Hello world!'
    }
    await next();
}

Server.use(yourMiddleware);

Server.listen(1337, () => {
    console.log('Started');
});
```

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