# koa-lifekit

> 物联网应用模块的最小化平台支撑

Latest version **2.0.0** (published 2017-06-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install koa-lifekit
pnpm add koa-lifekit
yarn add koa-lifekit
bun add koa-lifekit
```

Provides the command `lifekit`.

## 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 | 2.0.0 |
| Published | 2017-06-09 |
| First published | 2017-05-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 18 |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| Author | liujiangnan |
| Maintainers | chenjbguo |
| Keywords | lifekit, koa-lifekit |

## Links

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

## Dependencies (18)

- [ejs](https://npm.io/package/ejs.md) ^2.5.6
- [koa](https://npm.io/package/koa.md) ^2.2.0
- [path](https://npm.io/package/path.md) ^0.12.7
- [debug](https://npm.io/package/debug.md) ^2.6.3
- [koa-jwt](https://npm.io/package/koa-jwt.md) ^3.2.1
- [koa-cors](https://npm.io/package/koa-cors.md) 0.0.16
- [koa-json](https://npm.io/package/koa-json.md) ^2.0.2
- [koa-send](https://npm.io/package/koa-send.md) ^4.1.0
- [koa-views](https://npm.io/package/koa-views.md) ^5.2.1
- [socket.io](https://npm.io/package/socket.io.md) ^1.7.3
- [koa-logger](https://npm.io/package/koa-logger.md) ^2.0.1
- [koa-router](https://npm.io/package/koa-router.md) ^7.0.1
- [koa-static](https://npm.io/package/koa-static.md) ^3.0.0
- [koa-convert](https://npm.io/package/koa-convert.md) ^1.2.0
- [koa-onerror](https://npm.io/package/koa-onerror.md) ^1.2.1
- [socketio-jwt](https://npm.io/package/socketio-jwt.md) ^4.5.0
- [koa-bodyparser](https://npm.io/package/koa-bodyparser.md) ^3.2.0
- [koa-generic-session](https://npm.io/package/koa-generic-session.md) ^1.11.5

## Recent versions

- 2.0.0 (latest) — 2017-06-09
- 1.0.0 — 2017-05-05

## README

# koa-lifekit

物联网应用模块的最小化平台支撑(基于KOA实现)

# 1 概要说明

本平台意在实现为最小化的物联网应用模块提供容器,并提供简单易用的网络交互方式与高性能的实时数据更新<br>

# 2 安装方法及使用

    安装
```javascript  
    npm install koa-lifekit
```  
    使用
    * npm install
    * node app.js
    
# 3 第一次

1、在 /engine 下新建一个模块(文件夹) example，然后在example里新建 src 和 web 两个文件夹
2、在新建的src文件夹下新建service.js文件，编写内容如下：

```javascript

function service(net){ 
    net.data.message = "hello world!!";
}
module.exports = service;

```

3、在新建的web文件夹下新建index.ejs,编写内容如下：

`<div id="realData">`
    `<h1>{{message}}</h1>`
`</div>`
 
`<script> `

    var vue = net.datachange("realData");
`</script>`

4、在根目录打开CMD，输入 node app.js 命令来启动微服务

5、打开浏览器，输入http://localhost:8800/example 查看效果

# 4 更多功能与方法请查看iotlib/README.MD

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