Commit fe790029 by v_vjyjiang

d

parent 077e7f16
...@@ -4,8 +4,13 @@ var app = express(); ...@@ -4,8 +4,13 @@ var app = express();
var bodyParser = require('body-parser'); var bodyParser = require('body-parser');
app.use(bodyParser.json({ limit: '50mb' })); app.use(bodyParser.json({ limit: '50mb' }));
var server = http.createServer(app); var server = http.createServer(app);
app.post("/upline", function (req, res, next) { const util = require('util');
const exec = util.promisify(require('child_process').exec);
app.post("/upline", async function (req, res, next) {
console.log(req.body, "...........................") console.log(req.body, "...........................")
let { stdout, stderr } = await exec('ls')
console.log('stdout:', stdout);
console.error('stderr:', stderr);
res.end("ok") res.end("ok")
}) })
server.listen(31199, function () { server.listen(31199, function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment