test.js
const execFile = require('child_process').execFile;
const child = execFile('python', ['temp.py'], (error, stdout, stderr) => { if (error) {
throw error;
}
console.log(stdout);
});node test.js即可运行上述js文件,运行python脚本,
在Angular2组件中直接使用上述代码是显然不行的,那么在Angular2中时候有办法调用nodejs的API吗?
繁星coding
交互式爱情
随时随地看视频慕课网APP
相关分类