1.1.4 • Published 1 year ago

routehandler-express v1.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

1. how to setup routerhandler-express on express

const { routeHandler } = require("routehandler-express");
const express = require("express");
const port = 3000 || porcess.env.PORT;
const app = express();
const path = process.cwd();

routeHandler(app, path + "/route");

app.listen(port, () => {
  console.log(`app listening on port ${port}`);
});

2. you need to add a route

example :

example

3. you need to fill in module.exports in the file

//you add file "home.js" in route

module.exports = {
  name:"/",
  disable:false ? true,
  method: "get", // get, post, put etc
  run : (req,res) => {
    res.send("Hello To World")
  }
}

need help ? dm discord : Myuko#3399

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago