5 lines
168 B
JavaScript
5 lines
168 B
JavaScript
var fs = require('fs');
|
|
var file = process.argv[2];
|
|
fs.readFile(file, 'binary', function(err, data) {
|
|
console.log(new Buffer(data, 'binary').toString('base64'));
|
|
}); |