Use

noonjs.use(path?, handler)

Registers middleware functions or Express routers within the noonjs application. Can be used to apply global middleware, mount specific routes, or integrate third-party Express-compatible handlers.

  • If only a handler is provided: it is applied globally.
  • If both path and handler are provided: the handler is mounted on the given path.
...
   
noonjs.use(someMiddleware); // Global middleware
noonjs.use("/api/custom", customRouter); // Mounts custom Express router
   
...
Edit this page on Github
© 2025 kav3.com. Crafted with and dedication.