Welcome to simreq 👋
simulate routes of an express app with in the app .sometimes we need to execute more than one express endpoints to solve certain problems like sse or push notification .this module lets you simulate any of the routes from anywhere in your express app
Install
npm install simreq
Usage
var app = var simreq = requiresimreq.init;
Import again on any of the router you have
var simreq = require; Router.get Router.get
PARMS
-
simreq.simulator(req,next,options,callback): req: http request from the router next: next() from the router options:{}
{ url:"route", query:{}, params:{}, body:{}} callback:function (data)
Author
👤 Arjun Biju
- Website: https://github.com/Arrow66
- Github: @Arrow66
Show your support
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator