@noreajs/core
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -13,5 +13,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const app_1 = __importDefault(require("./app")); | ||
const app_1 = __importDefault(require("./lib/app")); | ||
const http = __importStar(require("http")); | ||
const https = __importStar(require("http")); | ||
const group_1 = __importDefault(require("./lib/routes/group")); | ||
const NoreaRouter_1 = __importDefault(require("./lib/routes/NoreaRouter")); | ||
const PORT = process.env.PORT || 3000; | ||
@@ -24,2 +26,8 @@ // create server | ||
}); | ||
module.exports = { | ||
route: { | ||
group: group_1.default, | ||
NoreaRouter: NoreaRouter_1.default | ||
} | ||
}; | ||
//# sourceMappingURL=index.js.map |
import express, { NextFunction } from "express"; | ||
import NoreRouter from './NoreRouter'; | ||
import NoreaRouter from './NoreaRouter'; | ||
@@ -10,3 +10,3 @@ /** | ||
*/ | ||
export default function group(prefix: string, middlewares: NextFunction[], routes: (router: NoreRouter) => void) { | ||
export default function group(prefix: string, middlewares: NextFunction[], routes: (router: NoreaRouter) => void) { | ||
const expressRouter = express.Router(); | ||
@@ -21,5 +21,5 @@ | ||
// define routes | ||
routes(new NoreRouter(expressRouter, prefix)); | ||
routes(new NoreaRouter(expressRouter, prefix)); | ||
return expressRouter; | ||
} |
{ | ||
"name": "@noreajs/core", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Norea.Js is a framework for building scalable Node.js server applications. Is is built with Typescript and use Express as web framework.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22581
43
431