Closed cblavier closed 9 years ago
Hey, I can't manage to expose console as an API (function is properly exposed, but nothing is printed to stdout)
Here is my api.js
api.js
exports.api = { console: console };
And my code
var SandCastle = require('sandcastle').SandCastle; var sandcastle = new SandCastle({ api: './api.js' }); var script = sandcastle.createScript("\ exports.main = function() {\ console.log('hello!');\ exit();\ }\ "); script.on('exit', function(err, output) { process.exit(0); }); script.run();
Any help would be much appreciated :)
trying running your script with the DEBUG environment variable set to sandcastle -
ala DEBUG=sandcastle, node myscript.js
DEBUG=sandcastle, node myscript.js
Working fine :) Thanks!
Hey, I can't manage to expose console as an API (function is properly exposed, but nothing is printed to stdout)
Here is my
api.js
And my code
Any help would be much appreciated :)