Comparing version 0.1.3 to 0.1.4
@@ -99,4 +99,2 @@ module.exports = function () { | ||
$this.config.store.impl = storeImpl($this.app, $this.config, $this.io, $this); | ||
var storeRoutes = require(path.join($this.config.rootPath, "lib", "store_default_routes")); | ||
shutdownHooks.push(storeRoutes($this.app, $this.config, $this.io, $this).shutdown); | ||
} | ||
@@ -107,3 +105,10 @@ | ||
$this.logger.log('debug', 'loading module: %s', routes[i], $this.meta); | ||
require(routes[i])($this.app, $this.config, $this.io, $this); | ||
var routehooks = require( | ||
routes[i].charAt(0) === '/' ? routes[i] : | ||
path.join($this.config.rootPath, "lib", routes[i]) | ||
)($this.app, $this.config, $this.io, $this); | ||
if (routehooks && routehooks.shutdown) { | ||
shutdownHooks.push(routehooks.shutdown); | ||
} | ||
} | ||
@@ -110,0 +115,0 @@ var cgi = $this.config.cgi instanceof Array ? $this.config.cgi : (typeof($this.config.cgi) === 'string' ? [$this.config.cgi] : []); |
@@ -5,3 +5,3 @@ { | ||
"description": "Minimal HTTP Server", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"repository": { | ||
@@ -39,3 +39,3 @@ "type": "git", | ||
"ip": "0.0.0.0", | ||
"routes": [], | ||
"routes": ["store_default_routes"], | ||
"cgi": [], | ||
@@ -42,0 +42,0 @@ "headers": [], |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
64177
1369
4