# vray

> koa 2 ksyun middleware

Latest version **3.1.16** (published 2020-04-15) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.16 |
| Published | 2020-04-15 |
| First published | 2018-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.6.0 |
| Dependencies | 30 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | wangjianliang |
| Maintainers | lynn.wang |

## Links

- npm: https://www.npmjs.com/package/vray
- Repository: git@newgit.op.ksyun.com:ksyun-fe/vray
- npm.io page: https://npm.io/package/vray

## Dependencies (30)

- [mz](https://npm.io/package/mz.md) latest
- [koa](https://npm.io/package/koa.md) ^2.5.2
- [glob](https://npm.io/package/glob.md) ^7.1.2
- [chalk](https://npm.io/package/chalk.md) ^2.3.0
- [kcors](https://npm.io/package/kcors.md) ^2.2.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [moment](https://npm.io/package/moment.md) ^2.20.1
- [request](https://npm.io/package/request.md) ^2.85.0
- [winston](https://npm.io/package/winston.md) ^3.0.0-rc5
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.1
- [killable](https://npm.io/package/killable.md) ^1.0.0
- [koa-body](https://npm.io/package/koa-body.md) ^4.0.4
- [koa-cash](https://npm.io/package/koa-cash.md) ^2.2.0
- [commander](https://npm.io/package/commander.md) ^2.13.0
- [koa-mount](https://npm.io/package/koa-mount.md) ^3.0.0
- [lru-cache](https://npm.io/package/lru-cache.md) ^4.1.1
- [iconv-lite](https://npm.io/package/iconv-lite.md) ^0.4.19
- [koa-helmet](https://npm.io/package/koa-helmet.md) ^3.3.0
- [koa-router](https://npm.io/package/koa-router.md) ^7.4.0
- [koa-static](https://npm.io/package/koa-static.md) latest
- [koa-convert](https://npm.io/package/koa-convert.md) ^1.2.0
- [koa-compress](https://npm.io/package/koa-compress.md) ^2.0.0
- [koa2-connect](https://npm.io/package/koa2-connect.md) ^1.0.2
- [query-string](https://npm.io/package/query-string.md) ^5.1.0
- [koa-any-error](https://npm.io/package/koa-any-error.md) ^1.0.1
- [moment-timezone](https://npm.io/package/moment-timezone.md) ^0.5.23
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.2
- [http-proxy-middleware](https://npm.io/package/http-proxy-middleware.md) ^0.18.0
- [koa-context-validator](https://npm.io/package/koa-context-validator.md) ^0.4.1

## Recent versions

- 3.1.16 (latest) — 2020-04-15
- 3.1.15 — 2020-04-15
- 3.1.14 — 2020-03-15
- 3.1.13 — 2020-03-15
- 3.1.12 — 2019-12-19
- 3.1.11 — 2019-12-18
- 3.1.10 — 2019-03-06
- 3.1.9 — 2019-03-05
- 3.1.8 — 2019-03-05
- 3.1.7 — 2019-03-05
- 3.1.6 — 2019-03-01
- 3.1.5-special — 2018-11-26
- 3.1.5 — 2018-07-21
- 3.1.4 — 2018-06-05
- 3.1.3 — 2018-06-01
- … 22 more at https://npm.io/package/vray/versions

## README

# vray
## 扩展koa , 添加默认中间件


### append interface
```
.mountDefaultMiddle //装载默认插件 , 如安全头等
.mountStatic(...<string> | ...<array>) //静态Server插件
.mountProxy(...<obj> | ...<array>) //代理插件
.mountMiddle(...<string> | ...<function>) //安装扩展插件
```

### add options in constructor
使用[winstonjs](https://github.com/winstonjs/winston)记录日志
```
constructor({
    log //日志配置信息
})
```

### use
```
const Vray = require('vray')
const app = new Vray()
app.listen(settings.port, settings.host);
```

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