New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@anxing131/q-router

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anxing131/q-router

Q-Router for Koa2 ========

  • 1.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Q-Router for Koa2

这是一个快速编写接口代码的工具 Router 库.

如何使用

npm i @anxing131/q-router
// app.js
const app = new Koa()
const Router = require('q-router')
const router = new Router()

router.addApis('/path/to/apis', '/prefix/api')
// add prefixes
// router.addApis('/path/to/apis', ['/api', ''])

app.use(router.routes)

// path/to/apis 这是一个目录, q-router 会检测目录下的文件, 只有符合 Q-API 格式要求即可.

事例

进入项目下 example 文件夹

> npm i
> node app

Fork 后较原版改动

  1. 新增 ajv createAjvErr 自定义函数支持
  2. fixed package.json libs version
  3. 支持子目录 APIs 加载

Lisence

MIT

FAQs

Package last updated on 03 Jun 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc