Skip to content

Instantly share code, notes, and snippets.

@fortunee
Last active May 30, 2017 08:16
Show Gist options
  • Save fortunee/ab2cb9fec393d68a23f7e1cc34eecc33 to your computer and use it in GitHub Desktop.
Save fortunee/ab2cb9fec393d68a23f7e1cc34eecc33 to your computer and use it in GitHub Desktop.
Import the required libraries
// We import our installed libraries from line 1 to 3
const Tweet = require('twitter');
const dotenv = require('dotenv').config(); // Call the config function of dotenv
const readline = require('readline');
// We create a readline interface for reading and writing user's input:
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question('Enter a username: ', (answer) => {
console.log(`Yay! We've got a twitter username: ${answer}`);
rl.close();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment