🚀 Launch Week Day 3:Introducing Supply Chain Attack Campaigns Tracking.Learn More
Socket
Book a DemoInstallSign in
Socket

koa-auto-routes

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-auto-routes

a tool to auto map your routers folder and router for koa

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

koa-auto-routes

a tool to auto map your routers folder and router for koa

用法

安装

    npm install koa-auto-routes --save

引入

在koa工程目录下的入口文件里

    var autoRoutes=require('koa-auto-routes')
    
    autoRoutes(app,'routes目录路径')

然后,koa-auto-routes就会自动帮你生成路由 ^.^

注意:index.js对应默认路径'/'

简单demo

dependence:

node.js V4+

Keywords

koa

FAQs

Package last updated on 16 Jun 2017

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