forked from svrjs/svrjs
Replace __dirname with process.dirname
This commit is contained in:
parent
9b8ccd31fc
commit
1fbede69e5
1 changed files with 2 additions and 2 deletions
|
@ -215,10 +215,10 @@ const {
|
|||
process.serverConfig = {};
|
||||
let configJSONRErr = undefined;
|
||||
let configJSONPErr = undefined;
|
||||
if (fs.existsSync(__dirname + "/config.json")) {
|
||||
if (fs.existsSync(process.dirname + "/config.json")) {
|
||||
let configJSONf = "";
|
||||
try {
|
||||
configJSONf = fs.readFileSync(__dirname + "/config.json"); // Read JSON File
|
||||
configJSONf = fs.readFileSync(process.dirname + "/config.json"); // Read JSON File
|
||||
try {
|
||||
process.serverConfig = JSON.parse(configJSONf); // Parse JSON
|
||||
} catch (err2) {
|
||||
|
|
Reference in a new issue