0
嗨,我想用bash命令运行这个脚本。我已经安装了节点从bash运行API javascript
我该如何运行?此外,我想解析bb.js NiceTitle一些变量例如节点./file.txt
<script type="text/javascript" src="http://binbox.io/api.js"></script>
<script type="text/javascript">
var BB = new Binbox.API("http://api.binbox.io/");
BB.create({
title: "here the NiceTitle from command",
text: "Here a path to ./file.txt",
}, function(result)
{
console.log(result);
if(result.ok)
{
console.log(result.id, result.salt);
}
else
{
console.log(result.error);
}
});
</script>
创建一个节点模块,然后用'node'运行它。 –
jfriend00
2014-11-02 21:52:33