UNPKG

expressmultithread

Version:

Fast, light-weight and low dependency [Express.js](https://www.npmjs.com/package/express) multithreaded router.

15 lines 596 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.route = void 0; const strings_1 = require("../../constants/strings"); function route(method, path, ...middlewares) { return (target, propertyKey) => { if (propertyKey === strings_1.get || propertyKey === strings_1.set) throw new Error(strings_1.keywordUse); Object.defineProperty(target, propertyKey + strings_1.__route, { value: { method, path, middlewares, cb: target[propertyKey] } }); return target; }; } exports.route = route; ; //# sourceMappingURL=route.js.map