Skip to content

the complete solution for node.js command-line programs with router

Notifications You must be signed in to change notification settings

koahubjs/koahub-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduce

The complete solution for node.js command-line programs with router

Usage

const Router = require("koahub-router");
const router = new Router();

router.use("--registry :registry", async (ctx, next) => {
	console.log(1);
	await next();
});
router.use("--registry :registry", async (ctx, next) => {
	console.log(2);
});

router.parse(process.argv);

About

the complete solution for node.js command-line programs with router

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published