mock-js-server
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -48,6 +48,6 @@ 'use strict'; | ||
config['conf-folder'] = './' + config['conf-folder'] + '/'; | ||
config['conf-folder'] = config['conf-folder']; | ||
try { | ||
fileOptions = require('../' + config['conf-folder'] + config['conf-file'] + '.json'); | ||
fileOptions = require(process.cwd() + '/' + config['conf-folder'] + config['conf-file'] + '.json'); | ||
parseOptions(config, fileOptions); | ||
@@ -54,0 +54,0 @@ } catch (err) { |
@@ -21,3 +21,3 @@ 'use strict'; | ||
function findMock(config, req) { | ||
let routesPath = `.${config['conf-folder']}${config['routes-file']}`; | ||
let routesPath = `${process.cwd()}/${config['conf-folder']}${config['routes-file']}`; | ||
delete require.cache[require.resolve(routesPath)]; | ||
@@ -24,0 +24,0 @@ let routes = require(routesPath); |
{ | ||
"name": "mock-js-server", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Mock server for API", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -53,3 +53,3 @@ # mock-js-server | ||
| Option | Key | Description | Default | | ||
| Option | Key | Default | Description | | ||
| ------------- | ------------- | ------------- | ------------- | | ||
@@ -56,0 +56,0 @@ | Config file | `-c` | `config.json` | Name of configuration file | |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
30415