diff --git a/core/components/status.js b/components/status.js similarity index 62% rename from core/components/status.js rename to components/status.js index d887867..78a860c 100644 --- a/core/components/status.js +++ b/components/status.js @@ -3,12 +3,12 @@ const express = require('express'), router.get('/v1/manager/status', (req, res) => { - let conn = db.sql("test", "SELECT * FROM users") - conn.then(data =>{ - functions["alert"].conlog(data) - - }) + // * Ejemplo de Conx. a MySQL + // let conn = db.sql("test", "SELECT * FROM users") + // conn.then(data =>{ + // functions["alert"].conlog(data) + // }) let response = { date: date.toJSON(), diff --git a/core/server.js b/core/server.js index 366ddca..6f596d3 100644 --- a/core/server.js +++ b/core/server.js @@ -10,7 +10,7 @@ const express = require("express"), global.functions = [] - let dirFunc = require("path").join(__dirname, "../core/functions/"), + let dirFunc = require("path").join(__dirname, "../functions/"), funcFiles = fs.readdirSync(dirFunc); funcFiles.forEach(r =>{ functions[r.replace(".js", "")] = require(dirFunc + "/" + r); @@ -24,7 +24,7 @@ const express = require("express"), exsrv.use(cors({ origin: '*' })); - let dirApis = require("path").join(__dirname, "../core/components/"), + let dirApis = require("path").join(__dirname, "../components/"), apiFiles = fs.readdirSync(dirApis); apiFiles.forEach(r =>{ exsrv.use(require(dirApis + "/" + r)); diff --git a/core/functions/alert.js b/functions/alert.js similarity index 100% rename from core/functions/alert.js rename to functions/alert.js