# yi-core

> yi core

Latest version **1.0.14** (published 2022-11-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install yi-core
pnpm add yi-core
yarn add yi-core
bun add yi-core
```

## 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 | 1.0.14 |
| Published | 2022-11-28 |
| First published | 2022-08-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 26 |
| Unpacked size | 36.1 KB |
| Known vulnerabilities | 0 (+37 in 5 direct dependencies) |
| Install scripts | no |
| Author | vcbear |
| Maintainers | saganlab |
| Keywords | yicore, saganlab |

## Links

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

## Dependencies (26)

- [pg](https://npm.io/package/pg.md) ^8.8.0
- [qs](https://npm.io/package/qs.md) ^6.11.0
- [ejs](https://npm.io/package/ejs.md) ^3.1.8
- [koa](https://npm.io/package/koa.md) ^2.13.4
- [pug](https://npm.io/package/pug.md) ^3.0.2
- [tsc](https://npm.io/package/tsc.md) ^2.0.4
- [glob](https://npm.io/package/glob.md) ^8.0.3
- [vary](https://npm.io/package/vary.md) ^1.1.2
- [axios](https://npm.io/package/axios.md) ^0.27.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [log4js](https://npm.io/package/log4js.md) ^6.6.1
- [mysql2](https://npm.io/package/mysql2.md) ^2.3.3
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [ioredis](https://npm.io/package/ioredis.md) ^5.2.3
- [@koa/cors](https://npm.io/package/@koa/cors.md) ^3.4.1
- [koa-views](https://npm.io/package/koa-views.md) ^8.0.0
- [sequelize](https://npm.io/package/sequelize.md) ^6.21.4
- [koa-multer](https://npm.io/package/koa-multer.md) ^1.0.2
- [koa-static](https://npm.io/package/koa-static.md) ^5.0.0
- [typescript](https://npm.io/package/typescript.md) ^4.8.2
- [koa-compose](https://npm.io/package/koa-compose.md) ^4.1.0
- [koa-onerror](https://npm.io/package/koa-onerror.md) ^4.2.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1
- [elasticsearch](https://npm.io/package/elasticsearch.md) ^16.7.3
- [oauth2-server](https://npm.io/package/oauth2-server.md) ^3.1.1
- [koa-bodyparser](https://npm.io/package/koa-bodyparser.md) ^4.3.0

## Recent versions

- 1.0.14 (latest) — 2022-11-28
- 1.0.13 — 2022-09-01
- 1.0.12 — 2022-08-30
- 1.0.11 — 2022-08-27
- 1.0.10 — 2022-08-25
- 1.0.9 — 2022-08-25
- 1.0.8 — 2022-08-25
- 1.0.7 — 2022-08-25
- 1.0.6 — 2022-08-25
- 1.0.5 — 2022-08-25
- 1.0.4 — 2022-08-25
- 1.0.3 — 2022-08-25
- 1.0.2 — 2022-08-25
- 1.0.1 — 2022-08-25
- 1.0.0 — 2022-08-24

## README

<!--
 * @Description: 
 * @version: 
 * @Company: saganlab
 * @Author: vcbear
 * @Date: 2022-08-24 15:12:39
 * @LastEditors: vcbear
 * @LastEditTime: 2022-08-25 15:56:36
-->

# yi

基于KOA构件的应用框架，已集成路由服务，静态资源服务，跨域，自定义中间件，网页模板，mock，日志

可按照如下配置进行相关功能配置

export default app => {
  return {
    // 路由模式配置
    router: 'koa-router',

    // 开发服务器配置
    devServer: {
      port: 2022
    },

    // 跨域配置
    cors: {
      allowMethods: 'POST,GET',
      maxAge: 0
    },

    // 自定义中间件配置
    middlewares: ['two', 'one'],

    // koa-view模版配置
    view: {
      extension: 'ejs'
    },

    // koa-bodyparser配置
    bodyparser: {

    },

    // koa-static配置
    static: {
      dirname: 'public',
    },

    // 日志配置
    log: {
      dir: path.join(__dirname, '../log')
    },

    // mock配置
    mock: {
      prefix: '', // api前缀
    },

  }
}

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