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