Comparing version 1.0.1 to 5.0.1
{ | ||
"name": "certbot", | ||
"version": "1.0.1", | ||
"version": "5.0.1", | ||
"main": "server.js", | ||
@@ -17,3 +17,4 @@ "repository": "https://github.com/Dois2/BOMPRO_LUCAS.git", | ||
"node-cmd": "^3.0.0", | ||
"node-run-cmd": "^1.0.1" | ||
"node-run-cmd": "^1.0.1", | ||
"shelljs": "^0.8.3" | ||
}, | ||
@@ -20,0 +21,0 @@ "devDependencies": { |
// Importações módulos: | ||
const express = require("express"); | ||
const cors = require("cors"); | ||
var cmd = require("node-cmd"); | ||
var shell = require("shelljs"); | ||
const server = express(); | ||
@@ -9,3 +9,3 @@ server.use(cors()); | ||
const porta = 222; | ||
const porta = 13100; | ||
@@ -39,10 +39,12 @@ server.listen(porta); | ||
var teste = cmd.get(command, function(err, data, stderr) { | ||
if (err != null) { | ||
console.log(`Deu este erro ${err}`); | ||
} else { | ||
console.log(`O que logou: ${data}`); | ||
shell.exec(stopNginx80, function(code, stdout, stderr) { | ||
console.log("Exit code:", code); | ||
if (code == 1) { | ||
shell.exec(startNginx80); | ||
} | ||
console.log("Program output:", stdout); | ||
console.log("Program stderr:", stderr); | ||
}); | ||
// console.log(teste); | ||
return res.json({ Status: "ok" }); | ||
}); |
2085
37
7
+ Addedshelljs@^0.8.3
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinterpret@1.4.0(transitive)
+ Addedis-core-module@2.16.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedrechoir@0.6.2(transitive)
+ Addedresolve@1.22.10(transitive)
+ Addedshelljs@0.8.5(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)