Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

koa-creator

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-creator

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

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

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);
});

FAQs

Package last updated on 17 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts