@zcorky/koa-cluster
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

koa-cluster

NPM version Coverage Status Dependencies Build Status license issues

Cluster for Koa

Install

$ npm install @zcorky/koa-cluster

Usage

  • 1 command line
  • 2 import { startApp } from 'koa-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
> koa-cluster app.js

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

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

Related

Readme

Keywords

none

Package Sidebar

Install

npm i @zcorky/koa-cluster

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

10.5 kB

Total Files

11

Last publish

Collaborators

  • uniquecolesmith