UNPKG

@skyslit/ark-express

Version:

A Framework for building modular business application using NodeJS Express

292 lines (237 loc) 28.9 kB
(function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/index.ts"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./src/context.ts": /*!************************!*\ !*** ./src/context.ts ***! \************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.serverContext = {\n initializeContext: function initializeContext(req, res, next) {\n req.context = {};\n next();\n },\n contextHandler: function contextHandler(req, res, next) {\n if (req.context) {\n res.json(req.context);\n } else {\n next();\n }\n }\n};\n\n//# sourceURL=webpack:///./src/context.ts?"); /***/ }), /***/ "./src/index.ts": /*!**********************!*\ !*** ./src/index.ts ***! \**********************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar package_1 = __webpack_require__(/*! ./package */ \"./src/package.ts\");\n\nexports.ArkExpressPackage = package_1.ArkExpressPackage;\n\nvar module_1 = __webpack_require__(/*! ./module */ \"./src/module.ts\");\n\nexports.ArkExpressModule = module_1.ArkExpressModule;\n\n__webpack_require__(/*! express-session */ \"express-session\");\n\n//# sourceURL=webpack:///./src/index.ts?"); /***/ }), /***/ "./src/module.ts": /*!***********************!*\ !*** ./src/module.ts ***! \***********************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar express_1 = __webpack_require__(/*! express */ \"express\");\n\nvar ArkExpressModule =\n/** @class */\nfunction () {\n function ArkExpressModule() {\n this.id = null;\n this.options = null;\n this.router = null;\n this[\"package\"] = null;\n this.modelMapping = []; // private middlewares: RequestHandler[] = [];\n\n this.middlewares = [];\n this.router = express_1.Router();\n }\n\n ArkExpressModule.prototype.registerModel = function (name, schema, dbName) {\n this.modelMapping.push({\n name: name,\n schema: schema,\n dbName: dbName\n });\n return this;\n };\n\n ArkExpressModule.prototype.getModel = function (name) {\n var _this = this;\n\n var index = this.modelMapping.findIndex(function (model) {\n return model.name === _this.__normalizeModelName(name);\n });\n\n if (index > -1) {\n if (this.modelMapping[index].instance) {\n return this.modelMapping[index].instance;\n } else {\n throw new Error('Looks like getModel is called before running the package');\n }\n }\n\n return null;\n };\n\n ArkExpressModule.prototype.getDatabase = function (name) {\n name = name || 'default';\n return this.getDatabase(this[\"package\"].resolveDatabaseModuleMap(this.id, name));\n };\n\n ArkExpressModule.prototype.getRouter = function () {\n return this.router;\n };\n\n ArkExpressModule.prototype.__normalizeModelName = function (modelName) {\n return this.id.toLowerCase() + \"_\" + modelName;\n };\n\n ArkExpressModule.prototype.__getMiddlewares = function () {\n return this.middlewares;\n };\n\n ArkExpressModule.prototype.use = function (middleware) {\n this.middlewares.push({\n handler: middleware\n });\n return this;\n };\n\n ArkExpressModule.prototype.useWithPath = function (path, middleware) {\n this.middlewares.push({\n handler: middleware,\n path: path\n });\n return this;\n };\n\n ArkExpressModule.prototype.main = function () {// Do nothing\n };\n\n return ArkExpressModule;\n}();\n\nexports.ArkExpressModule = ArkExpressModule;\n\n//# sourceURL=webpack:///./src/module.ts?"); /***/ }), /***/ "./src/package.ts": /*!************************!*\ !*** ./src/package.ts ***! \************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar express_1 = __importDefault(__webpack_require__(/*! express */ \"express\"));\n\nvar mongoose_1 = __importDefault(__webpack_require__(/*! mongoose */ \"mongoose\"));\n\nvar chalk_1 = __importDefault(__webpack_require__(/*! chalk */ \"chalk\"));\n\nvar cli_table3_1 = __importDefault(__webpack_require__(/*! cli-table3 */ \"cli-table3\"));\n\nvar http_1 = __importDefault(__webpack_require__(/*! http */ \"http\"));\n\nvar https_1 = __importDefault(__webpack_require__(/*! https */ \"https\"));\n\nvar morgan_1 = __importDefault(__webpack_require__(/*! morgan */ \"morgan\"));\n\nvar cors_1 = __importDefault(__webpack_require__(/*! cors */ \"cors\"));\n\nvar body_parser_1 = __importDefault(__webpack_require__(/*! body-parser */ \"body-parser\"));\n\nvar cookie_parser_1 = __importDefault(__webpack_require__(/*! cookie-parser */ \"cookie-parser\"));\n\nvar utils_1 = __importDefault(__webpack_require__(/*! ./utils */ \"./src/utils.ts\"));\n\nvar express_session_1 = __importDefault(__webpack_require__(/*! express-session */ \"express-session\"));\n\nvar connect_mongo_1 = __importDefault(__webpack_require__(/*! connect-mongo */ \"connect-mongo\"));\n\nvar context_1 = __webpack_require__(/*! ./context */ \"./src/context.ts\");\n\nfunction clearConsole() {// console.clear();\n}\n\nvar __hasInitialisedOnce = false;\n\nvar ArkExpressPackage =\n/** @class */\nfunction () {\n function ArkExpressPackage() {\n this.mongoose = mongoose_1[\"default\"];\n this.modules = {};\n this.databases = [];\n this.httpServer = null;\n this.httpsServer = null;\n this.httpsOptions = null;\n this.httpOption = null;\n this.httpPort = 80;\n this.httpsPort = 443;\n this.enableExpressSession = false;\n this.app = express_1[\"default\"]();\n this.utils = utils_1[\"default\"](this);\n }\n\n ArkExpressPackage.getInstance = function () {\n if (!ArkExpressPackage.instance) {\n ArkExpressPackage.instance = new ArkExpressPackage();\n return ArkExpressPackage.instance;\n }\n\n return ArkExpressPackage.instance;\n };\n\n ArkExpressPackage.prototype._normalizeModuleOptions = function (opts) {\n return Object.assign({\n rootPath: '/'\n }, opts || {});\n };\n\n ArkExpressPackage.prototype.useModule = function (id, module, options) {\n module.options = this._normalizeModuleOptions(options);\n module.utils = this.utils;\n module[\"package\"] = this;\n module.id = id; // @ts-ignore\n\n this.modules[id] = module;\n return this;\n };\n\n ArkExpressPackage.prototype.useDatabase = function (dbConfig) {\n if (this.databases.findIndex(function (d) {\n return d.name === dbConfig.name;\n }) > -1) {\n throw new Error(\"Database with same name already exists. Name: \" + dbConfig.name);\n }\n\n dbConfig.name = dbConfig.name || 'default';\n this.databases.push(dbConfig);\n return this;\n };\n\n ArkExpressPackage.prototype.useMongoose = function (mongoose) {\n this.mongoose = mongoose;\n return this;\n };\n\n ArkExpressPackage.prototype.getDatabase = function (name) {\n name = name || 'default';\n\n if (Array.isArray(this.databases)) {\n if (this.databases.length > 0) {\n var _db = this.databases.find(function (db) {\n return db.name === name;\n });\n\n if (_db) {\n if (!_db.connection) {\n throw new Error('Looks like you tried to call getDatabase before starting the server');\n }\n\n return _db.connection;\n }\n }\n }\n\n return null;\n };\n\n ArkExpressPackage.prototype.resolveDatabaseModuleMap = function (moduleId, databaseName) {\n return 'default';\n };\n\n ArkExpressPackage.prototype.configure = function (opts) {\n this.httpOption = opts;\n return this;\n };\n\n ArkExpressPackage.prototype.configureHttps = function (opts) {\n this.httpsOptions = opts;\n return this;\n };\n\n ArkExpressPackage.prototype.useMongoSession = function (value) {\n this.enableExpressSession = value;\n return this;\n };\n\n ArkExpressPackage.prototype.usePort = function (port, securePort) {\n this.httpPort = port ? port : 80;\n this.httpsPort = securePort ? securePort : 443;\n };\n\n ArkExpressPackage.prototype._initializeModules = function (cb) {\n var _this = this;\n\n Object.keys(this.modules).forEach(function (moduleKey) {\n var _module = _this.modules[moduleKey]; // Register Models - BEGIN\n\n var db;\n\n if (Array.isArray(_module.modelMapping) && _module.modelMapping.length > 0) {\n _module.modelMapping.forEach(function (model) {\n model.dbName = model.dbName ? model.dbName : 'default';\n model.name = _module.__normalizeModelName(model.name);\n db = _this.getDatabase(_this.resolveDatabaseModuleMap(_module.id, model.dbName));\n\n if (!db) {\n throw new Error('Database has to be initialized before performing module registration');\n }\n\n model.instance = db.model(model.name, model.schema);\n });\n } // Register Models - END\n\n\n _module.main.call(_module);\n });\n cb(null);\n };\n\n ArkExpressPackage.prototype._connectDatabases = function (cb) {\n var _this = this;\n\n var verifyConnection = function verifyConnection(cb) {\n cb(_this.databases.every(function (db) {\n if (db.connection) {\n return db.connection.readyState === 1;\n }\n\n return false;\n }));\n };\n\n var showConnectionStatus = function showConnectionStatus() {\n clearConsole();\n console.log(chalk_1[\"default\"].gray('DATABASES:'));\n var dbTable = new cli_table3_1[\"default\"]({\n head: [chalk_1[\"default\"].gray('#'), chalk_1[\"default\"].gray('name'), chalk_1[\"default\"].gray('status')]\n });\n dbTable.push.apply(dbTable, _this.databases.map(function (db, index) {\n return [\"\" + (index + 1), chalk_1[\"default\"].green(db.name), chalk_1[\"default\"].green('online')];\n }));\n console.log(dbTable.toString());\n };\n\n new Promise(function (resolve, reject) {\n console.log(chalk_1[\"default\"].green(\"Connecting \" + _this.databases.length + \" database(s)...\"));\n setTimeout(function () {\n clearConsole();\n\n _this.databases.forEach(function (db) {\n if (!db.connection) {\n db.useNewUrlParser = true;\n db.useUnifiedTopology = true;\n db.connection = _this.mongoose.createConnection(db.connectionString, Object.keys(db).reduce(function (accumulator, item) {\n var _a;\n\n if (['name', 'connectionString'].indexOf(item) < 0) return Object.assign(accumulator, (_a = {}, _a[item] = db[item], _a));\n return accumulator;\n }, {}));\n db.connection.on('open', function () {\n return verifyConnection(function (isConnectedAll) {\n if (isConnectedAll === true) {\n showConnectionStatus();\n resolve(true);\n cb(null);\n }\n });\n });\n db.connection.on('error', function (e) {\n console.error(chalk_1[\"default\"].red(e.message));\n reject(e);\n cb(e);\n });\n }\n });\n }, 80);\n });\n };\n\n ArkExpressPackage.prototype._connectUtilityMiddlewares = function (cb) {\n try {\n // Initialize app middlewares\n this.app.use(context_1.serverContext.initializeContext);\n this.app.use(morgan_1[\"default\"]('dev'));\n this.app.use(express_1[\"default\"].json({\n limit: '50mb'\n }));\n this.app.use(cookie_parser_1[\"default\"]());\n this.app.use(body_parser_1[\"default\"].urlencoded({\n extended: true,\n limit: '50mb'\n }));\n this.app.use(express_1[\"default\"].urlencoded({\n extended: false,\n limit: '50mb'\n })); // Session configuration\n\n if (this.enableExpressSession === true) {\n var MongoStore = connect_mongo_1[\"default\"](express_session_1[\"default\"]);\n this.app.use(express_session_1[\"default\"]({\n secret: 'secret',\n name: 'name',\n saveUninitialized: true,\n resave: true,\n store: new MongoStore({\n mongooseConnection: this.getDatabase()\n }),\n cookie: {\n expires: new Date(Date.now() + 7776000000)\n }\n }));\n }\n\n this.app.use(cors_1[\"default\"]({\n origin: true,\n credentials: true\n }));\n cb(null);\n } catch (err) {\n cb(err);\n }\n };\n\n ArkExpressPackage.prototype._connectModuleMiddlewares = function (cb) {\n var _this = this;\n\n Object.keys(this.modules).forEach(function (moduleKey) {\n var _module = _this.modules[moduleKey];\n\n _module.__getMiddlewares().forEach(function (middleware) {\n if (middleware.path) {\n _this.app.use(middleware.path, middleware.handler);\n } else {\n _this.app.use(middleware.handler);\n }\n });\n }); // Attach context handler middleware after attaching module middlewares\n\n this.app.get('/__context', context_1.serverContext.contextHandler);\n cb(null);\n };\n\n ArkExpressPackage.prototype._connectModuleRoutes = function (cb) {\n var _this = this;\n\n Object.keys(this.modules).forEach(function (moduleKey) {\n var _module = _this.modules[moduleKey];\n\n _this.app.use(_module.options.rootPath, _module.getRouter());\n });\n cb(null);\n };\n\n ArkExpressPackage.prototype.start = function (cb) {\n var _this = this; // Initialize server(s)\n\n\n this.httpServer = http_1[\"default\"].createServer(this.httpOption, this.app);\n clearConsole();\n console.log(chalk_1[\"default\"].blue('Starting application server...'));\n\n var handleErr = function handleErr(err) {\n if (err) throw err;\n };\n\n this._connectDatabases(function (err) {\n if (__hasInitialisedOnce === true) {\n return;\n }\n\n __hasInitialisedOnce = true;\n handleErr(err);\n\n _this._connectUtilityMiddlewares(function (err) {\n handleErr(err);\n\n _this._initializeModules(function (err) {\n handleErr(err);\n\n _this._connectModuleMiddlewares(function (err) {\n handleErr(err);\n\n _this._connectModuleRoutes(function (err) {\n handleErr(err);\n\n if (_this.httpsOptions) {\n // Initialize HTTPS server\n _this.httpsServer = https_1[\"default\"].createServer(_this.httpsOptions, _this.app);\n\n _this.httpsServer.addListener('listening', function () {\n console.log(chalk_1[\"default\"].green(\"HTTPS listening on port \" + _this.httpsPort));\n });\n\n _this.httpsServer.listen(_this.httpsPort);\n }\n\n _this.httpServer.addListener('listening', function () {\n console.log(chalk_1[\"default\"].green(\"HTTP listening on port \" + _this.httpPort));\n cb && cb(null);\n });\n\n _this.httpServer.listen(_this.httpPort);\n });\n });\n });\n });\n });\n };\n\n return ArkExpressPackage;\n}();\n\nexports.ArkExpressPackage = ArkExpressPackage;\n\n//# sourceURL=webpack:///./src/package.ts?"); /***/ }), /***/ "./src/utils.ts": /*!**********************!*\ !*** ./src/utils.ts ***! \**********************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nvar __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n\n while (_) {\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n\n case 7:\n op = _.ops.pop();\n\n _.trys.pop();\n\n continue;\n\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n\n if (t && _.label < t[2]) {\n _.label = t[2];\n\n _.ops.push(op);\n\n break;\n }\n\n if (t[2]) _.ops.pop();\n\n _.trys.pop();\n\n continue;\n }\n\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n }\n\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar express_validator_1 = __webpack_require__(/*! express-validator */ \"express-validator\");\n\nexports[\"default\"] = function (_package) {\n return {\n validate: function validate(validations) {\n return function (req, res, next) {\n return __awaiter(void 0, void 0, void 0, function () {\n var errors, resPayload;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4\n /*yield*/\n , Promise.all(validations.map(function (validation) {\n return validation.run(req);\n }))];\n\n case 1:\n _a.sent();\n\n errors = express_validator_1.validationResult(req);\n\n if (errors.isEmpty()) {\n return [2\n /*return*/\n , next()];\n }\n\n resPayload = {\n message: 'Validation failed',\n errors: errors.array()\n };\n\n if (resPayload.errors.length > 0) {\n resPayload.message = resPayload.errors[0].msg;\n }\n\n res.status(422).json(resPayload);\n return [2\n /*return*/\n ];\n }\n });\n });\n };\n },\n authorize: function authorize(roles) {\n roles = roles ? roles : [];\n return function (req, res, next) {\n if (req.user) {\n if (Array.isArray(roles) && roles.length > 0) {\n if (req.user.roles.some(function (r) {\n return roles.indexOf(r) > -1;\n })) {\n return next();\n }\n } else {\n return next();\n }\n }\n\n return res.status(401).json({\n message: 'Request unauthorized'\n });\n };\n }\n };\n};\n\n//# sourceURL=webpack:///./src/utils.ts?"); /***/ }), /***/ "body-parser": /*!******************************!*\ !*** external "body-parser" ***! \******************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"body-parser\");\n\n//# sourceURL=webpack:///external_%22body-parser%22?"); /***/ }), /***/ "chalk": /*!************************!*\ !*** external "chalk" ***! \************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"chalk\");\n\n//# sourceURL=webpack:///external_%22chalk%22?"); /***/ }), /***/ "cli-table3": /*!*****************************!*\ !*** external "cli-table3" ***! \*****************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"cli-table3\");\n\n//# sourceURL=webpack:///external_%22cli-table3%22?"); /***/ }), /***/ "connect-mongo": /*!********************************!*\ !*** external "connect-mongo" ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"connect-mongo\");\n\n//# sourceURL=webpack:///external_%22connect-mongo%22?"); /***/ }), /***/ "cookie-parser": /*!********************************!*\ !*** external "cookie-parser" ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"cookie-parser\");\n\n//# sourceURL=webpack:///external_%22cookie-parser%22?"); /***/ }), /***/ "cors": /*!***********************!*\ !*** external "cors" ***! \***********************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"cors\");\n\n//# sourceURL=webpack:///external_%22cors%22?"); /***/ }), /***/ "express": /*!**************************!*\ !*** external "express" ***! \**************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"express\");\n\n//# sourceURL=webpack:///external_%22express%22?"); /***/ }), /***/ "express-session": /*!**********************************!*\ !*** external "express-session" ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"express-session\");\n\n//# sourceURL=webpack:///external_%22express-session%22?"); /***/ }), /***/ "express-validator": /*!************************************!*\ !*** external "express-validator" ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"express-validator\");\n\n//# sourceURL=webpack:///external_%22express-validator%22?"); /***/ }), /***/ "http": /*!***********************!*\ !*** external "http" ***! \***********************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"http\");\n\n//# sourceURL=webpack:///external_%22http%22?"); /***/ }), /***/ "https": /*!************************!*\ !*** external "https" ***! \************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"https\");\n\n//# sourceURL=webpack:///external_%22https%22?"); /***/ }), /***/ "mongoose": /*!***************************!*\ !*** external "mongoose" ***! \***************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"mongoose\");\n\n//# sourceURL=webpack:///external_%22mongoose%22?"); /***/ }), /***/ "morgan": /*!*************************!*\ !*** external "morgan" ***! \*************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = require(\"morgan\");\n\n//# sourceURL=webpack:///external_%22morgan%22?"); /***/ }) /******/ })));