@koex/cluster
cluster for koa extend
Last updated a year ago by uniquecolesmith .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @koex/cluster 
SYNC missed versions from official npm registry.

cluster

NPM version Coverage Status Dependencies Build Status license issues

cluster for koa extend.

Install

$ npm install @koex/cluster

Usage

  • 1 command line
  • 2 import { startApp } from 'cluster';
// app.js / app.ts
import * as Koa from 'koa';

const app = new Koa();

app.use(ctx => {
  ctx.body = 'hi, koa-cluster';
});

export default app;

// 1 command line
> koex-cluster app.js

// 2 code: server.js
import { startApp } from '@koex/cluster';
import app from './app';

startApp(app.callback(), {
  port: 8000,
  host: '0.0.0.0',
});

Related

Current Tags

  • 0.0.3                                ...           latest (a year ago)

3 Versions

  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 3
Last Month 4
Dependencies (3)
Dev Dependencies (15)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |