koa-creator
# 注意!这个库还未开发完毕
Last updated 2 years ago by ymblender .
ISC · Original npm · Tarball · package.json
$ cnpm install koa-creator 
SYNC missed versions from official npm registry.

Koa-creator

注意!这个库还未开发完毕

只需要几行命令就可以快速启动一个包含 gzip,static-server,deamon,多线程的 koa 服务

const { creator, thread } = require('koa-creator');

thread('auto', false, () => {
  const { app, listen } = creator();

  app.use(async (ctx, next) => {
    await next();
    if (ctx.path !== '/api/a') return;
    ctx.body = { name: 'test-a', age: 200 };
  });

  listen(4000);
});

Current Tags

  • 0.1.1                                ...           latest (2 years ago)

8 Versions

  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (27)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |