@vasrefil/api-toolkit 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -0
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const customMiddleware: (req: Request, res: Response, next: any) => void;
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.customMiddleware = void 0;
|
|
6
7
|
const express_1 = __importDefault(require("express"));
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const cors_1 = __importDefault(require("cors"));
|
|
@@ -39,3 +40,8 @@ app.use(errorHandler());
|
|
|
39
40
|
app.listen(port, () => {
|
|
40
41
|
console.log(`Server is running on port ${port}`);
|
|
41
42
|
});
|
|
43
|
+
const customMiddleware = (req, res, next) => {
|
|
44
|
+
// Your middleware logic here
|
|
45
|
+
next();
|
|
46
|
+
};
|
|
47
|
+
exports.customMiddleware = customMiddleware;
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vasrefil/api-toolkit",
|
|
3
3
|
"description": "This is Vasrefil API toolkit",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.6",
|
|
5
5
|
"author": "Sodiq Alabi",
|
|
6
|
-
"main": "
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"start": "ts-node-dev src/index.ts",
|
|
9
10
|
"build": "tsc",
|
|
11
|
+
"prepublishOnly": "npm run build",
|
|
10
12
|
"serve": "node dist/index.js",
|
|
11
13
|
"dev": "nodemon --exec ts-node src/index.ts",
|
|
12
14
|
"run-ts-node": "ts-node-dev"
|