siwi-microservice

1.0.0 • Public • Published

siwi-microservice

基于siwi-daemon siwi-logger 等的微服务框架

安装

yarn add siwi-microservice

npm install siwi-microservice

测试

export NODE_ENV=dev
cd test
node index.js

配置

{
    /** 运行日志配置 **/
    logger: {
        path: `${process.env.PWD}/logs`,
        expire: 86400 * 7,
        name: '[siwi-micro]'
    },
    /** 子进程路由 **/
    routes: [
        { command: "node", args: ['role.js', '--watch'], options: { cwd: `${process.env.PWD}/routes`, detached: false } },
        { command: "node", args: ['user.js', '--watch'], options: { cwd: `${process.env.PWD}/routes`, detached: false } }
    ],
    /** redis **/
    redis: {
        port: 6379,          // Redis port
        host: '127.0.0.1',   // Redis host
        family: 4,           // 4 (IPv4) or 6 (IPv6)
        password: 'auth',
        db: 0
    },
    /** mongodb **/
    mongodb: {

    },
    /** mysql **/
    mysql: {

    },
    /** 微信配置 **/
    wechat: [

    ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i siwi-microservice

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • siwi