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

auto-routes

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

auto-routes

a tool for express to auto map url routes and project's routes directory

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

auto-routes

a tool for express to auto map url routes and project's routes directory

根据项目目录自动生成路由,基于express

用法

安装

    npm install auto-routes --save

引入

在express工程目录下的app.js里

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

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

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

简单demo

dependence:

node.js V4+

Keywords

express

FAQs

Package last updated on 21 Dec 2016

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