Skip to content

Instantly share code, notes, and snippets.

@pwlin
Last active January 4, 2016 05:29
Show Gist options
  • Save pwlin/8575114 to your computer and use it in GitHub Desktop.
Save pwlin/8575114 to your computer and use it in GitHub Desktop.
document.addEventListener("DOMContentLoaded", function(event) {
init();
});
function init() {
var fs = require('fs');
fs.writeFile(process.execPath.replace('nw.exe', '') + 'test1.txt', 'hello hello', function(err) {
if (err) {
console.log(err);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment