This is a Shell for LeanCloud, by Python(master branch) and Nodejs(NodeJS branch).
It provide some API, in API, it use library to shell the command, and print output of shell command in console.
- ls: A test API, shell command such as "ls -l".
- top: top -b -n 1 -H
- ps: ps -eLf
- cpuinfo: cat /etc/issue && cat /proc/cpuinfo
- shell: shell command use subprocess.Popen method.
-
psutil>=5.4.3(Python)
-
procstreams >= 0.3.0(Nodejs)
- just deploy
open https://leancloud.cn/dashboard/apionline/index.html
var paramsJson = {
paramsJson: {
pr_string: "ls -l",
pr_int: 123,
pr_date: Date.now(),
pr_pointer:'5b5b42b4808ca4006fc6e1e4',
pr_json:{
pr_string: "type string",
pr_int: 456,
pr_date: Date.now(),
}
}
};
AV.Cloud.run('test', paramsJson).then(console.log('call cloudfun test ok'))