Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mullayam/nodejs-express-interceptor
Build Express middleware to intercept / replace / inspect / transform response
https://github.com/mullayam/nodejs-express-interceptor
Last synced: 8 days ago
JSON representation
Build Express middleware to intercept / replace / inspect / transform response
- Host: GitHub
- URL: https://github.com/mullayam/nodejs-express-interceptor
- Owner: Mullayam
- Created: 2023-09-03T15:00:32.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-23T04:06:38.000Z (about 1 year ago)
- Last Synced: 2023-10-23T05:21:15.123Z (about 1 year ago)
- Language: TypeScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
```js
const { Interceptor } = require("@enjoys/express-interceptor");
// import { Interceptor } from "@enjoys/express-interceptor";
const express = require("express");
cosnt app = express();
// ....
Interceptor.useInterceptors(app, {
response: { test: "Interceptor Response " },
// enter your custom interceptor in object format
isEnable: false,
// default is false, to use interceptor isEnabled must be true
});
```