Skip to content

Instantly share code, notes, and snippets.

@LiamHz
Created August 29, 2018 23:35
Show Gist options
  • Save LiamHz/c2caa09eca8567432078894b4c14a655 to your computer and use it in GitHub Desktop.
Save LiamHz/c2caa09eca8567432078894b4c14a655 to your computer and use it in GitHub Desktop.
// Read authentication credentials from file
var fs = require('fs');
fs.readFile('credentials.txt', 'utf8', function(err, contents) {
var text = contents.split("\n")
text[1] = text[1].substring(0, text[1].length - 1);
text[2] = text[2].substring(0, text[2].length - 1);
username = text[1];
password = text[2];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment