server-libs
提供一个基础的服务器库,封装了 mongodb express ,可以提供 tcp http 的网络模块支持
Last updated 7 months ago by hnchenkai .
ISC · Original npm · Tarball · package.json
$ cnpm install server-libs 
SYNC missed versions from official npm registry.

server-libs

NPM Version NPM Downloads Node.js Version

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install server-libs

API

var Lib = require('server-libs')

MongodbMoudle

Lib.MongodbMoudle.init([{ host: "127.0.0.1", port: 27017 }])

WebRouteModule

先注册路由文件位置 Lib.WebRouteModule.routePath(process.cwd()) 然后初始化模块 Lib.WebRouteModule.init(8080);

InitMoudle

启动项的前置配置信息 Lib.WebRouteModule.routePath(process.cwd()) 注册启动项 Lib.InitMoudle.regist(Lib.WebRouteModule, Lib.WebRouteModule.init, 8088) Lib.InitMoudle.regist(Lib.MongodbMoudle, Lib.MongodbMoudle.init, [{ host: "127.0.0.1", port: 27017 }]) 启动模块 Lib.InitMoudle.startApp() 启动的时候是按照顺序一个一个启动的,成功启动一个模块才会启动下一个模块

Examples

Simple type negotiation

const Lib = require("server-libs");
Lib.WebRouteModule.routePath(process.cwd());
Lib.InitMoudle.regist(Lib.WebRouteModule, Lib.WebRouteModule.init, 8088);
Lib.InitMoudle.regist(Lib.MongodbMoudle, Lib.MongodbMoudle.init, [{ host: "127.0.0.1", port: 27017 }]);
Lib.InitMoudle.startApp();

License

MIT

Current Tags

  • 1.6.24                                ...           latest (7 months ago)

73 Versions

  • 1.6.24                                ...           7 months ago
  • 1.6.23                                ...           7 months ago
  • 1.6.22                                ...           7 months ago
  • 1.6.21                                ...           8 months ago
  • 1.6.20                                ...           9 months ago
  • 1.6.18                                ...           9 months ago
  • 1.6.16                                ...           9 months ago
  • 1.6.15                                ...           9 months ago
  • 1.6.14                                ...           9 months ago
  • 1.6.13                                ...           9 months ago
  • 1.6.12                                ...           9 months ago
  • 1.6.11                                ...           9 months ago
  • 1.6.10                                ...           9 months ago
  • 1.6.8                                ...           9 months ago
  • 1.6.7                                ...           9 months ago
  • 1.6.6                                ...           9 months ago
  • 1.6.5                                ...           9 months ago
  • 1.6.4                                ...           9 months ago
  • 1.6.3                                ...           9 months ago
  • 1.6.2                                ...           9 months ago
  • 1.6.1                                ...           9 months ago
  • 1.6.0                                ...           9 months ago
  • 1.5.3                                ...           9 months ago
  • 1.5.2                                ...           10 months ago
  • 1.5.1                                ...           10 months ago
  • 1.5.0                                ...           10 months ago
  • 1.4.11                                ...           10 months ago
  • 1.4.10                                ...           10 months ago
  • 1.4.7                                ...           10 months ago
  • 1.4.8                                ...           10 months ago
  • 1.4.5                                ...           10 months ago
  • 1.4.4                                ...           10 months ago
  • 1.4.2                                ...           10 months ago
  • 1.4.1                                ...           10 months ago
  • 1.4.0                                ...           a year ago
  • 1.3.18                                ...           a year ago
  • 1.3.17                                ...           a year ago
  • 1.3.16                                ...           a year ago
  • 1.3.15                                ...           a year ago
  • 1.3.14                                ...           a year ago
  • 1.3.13                                ...           a year ago
  • 1.3.12                                ...           a year ago
  • 1.3.11                                ...           a year ago
  • 1.3.10                                ...           a year ago
  • 1.3.9                                ...           a year ago
  • 1.3.8                                ...           a year ago
  • 1.3.7                                ...           a year ago
  • 1.3.4                                ...           a year ago
  • 1.3.3                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.7                                ...           a year ago
  • 1.2.6                                ...           a year ago
  • 1.2.5                                ...           a year ago
  • 1.2.4                                ...           a year ago
  • 1.2.3                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.1.9                                ...           a year ago
  • 1.1.8                                ...           a year ago
  • 1.1.7                                ...           a year ago
  • 1.1.6                                ...           a year ago
  • 1.1.5                                ...           a year ago
  • 1.1.4                                ...           a year ago
  • 1.1.3                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (17)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |