Commit 1e258f87 by DESKTOP-7Q3CA17\86137
parents 7a7a274a c3714391
...@@ -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 () {
......
...@@ -18,7 +18,7 @@ spec: ...@@ -18,7 +18,7 @@ spec:
restartPolicy: Always restartPolicy: Always
containers: containers:
- name: icp-deliver - name: icp-deliver
image: registry.cn-beijing.aliyuncs.com/hantang2/imgshare:1220.0.24 image: registry.cn-beijing.aliyuncs.com/hantang2/imgshare:1220.0.25
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 80 - containerPort: 80
......
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