Comparing version
@@ -49,4 +49,12 @@ const cluster = require('cluster') | ||
let json = path.join(pathData, moduleName + '.json') | ||
let pathJs = path.join(pathData, moduleName, 'index.js') | ||
let pathJson = path.join(pathData, moduleName, 'index.json') | ||
let stats = null | ||
switch (true) { | ||
case fs.existsSync(pathJs): | ||
stats = fs.lstatSync(js) | ||
break | ||
case fs.existsSync(pathJson): | ||
stats = fs.lstatSync(json) | ||
break | ||
case fs.existsSync(pure): | ||
@@ -53,0 +61,0 @@ stats = fs.lstatSync(pure) |
{ | ||
"name": "x-easy", | ||
"version": "2.1.7", | ||
"version": "2.1.8", | ||
"description": "Make simple and modular, building a web application with express.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,2 +27,3 @@ # X-Easy | ||
// optional, require (secure: true) to work | ||
disableSession: false // default | ||
keys: { | ||
@@ -34,10 +35,12 @@ key: './keyFile.key', // or './keyFile.pem' | ||
}) | ||
// loadModule can load <folder>/index.js, <folder>/index.json, | ||
// <file>.js and <file>.json | ||
// file to load data | ||
.loadModule('./data') // json file | ||
.loadModule('data') // json file | ||
// file to default settings | ||
.loadModule('./config') // js file | ||
.loadModule('config') // js file | ||
// file for route settings | ||
.loadModule('./routes') // js file | ||
.loadModule('routes') // js file | ||
// file for websocket settings | ||
.loadModule('./websocket') // js file | ||
.loadModule('websocket') // js file | ||
// method for creating channel between processes | ||
@@ -44,0 +47,0 @@ .joinProcessListener('chat') |
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
47487
0.89%408
2%154
1.99%1
Infinity%