Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add flag persmison to write file nodejs

var fs = require('fs');

var stream = fs.createWriteStream('hello.js', { mode: 0o755 });
stream.write("#!/usr/bin/node
");
stream.write("console.log('hello world');");
stream.end();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #flag #persmison #write #file #nodejs
ADD COMMENT
Topic
Name
1+3 =