1.2.1 • Published 2 years ago

express-quickrouter v1.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Run The Following commands in your terminal

npm init -y
npm i express-quickrouter

Sample Code

const express = require('express');
var {newRoute,routes} = require('express-quickrouter')
const app = express();
var route = new newRoute("/","GET",(req,res) => {
    res.send("404");
}) // with this, you can copy and add as many routes you want

app.use(route,require("express").Router()); // with this, you can copy and add as many routes you want
app.listen(8000)

ChangeLog Version 1.2.0

Added middleware functioning: Now the route, method, callback and middleware will default to:

{name:"/",
method:"GET",
callback: (req,res) => {res.send("Working")},
 middleware: (req,res,next) => {console.log("V"); next()},

}

when no parameters are passed with the

newRoute()

constructer

Changelog Version 1.2.1

BUG WARNING for the newRoute() constructor.

FOR THE DEFAULT FUNCTIONS TO PASS, AN EMPTY OBJECT {} MUST BE PASSED OR WILL RETURN AN ERROR.YOU HAVE BEEN WARNED. USE THIS AT YOUR OWN RISK.

1.2.0

2 years ago

1.1.3

2 years ago

1.2.1

2 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago