Created
November 5, 2018 01:21
-
-
Save ArataKagan/6f16c2e13d711f884aa8e985507d509f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const commands = require('./commands.js'); | |
//prompt the user for input | |
process.stdout.write('prompt > '); | |
// the stdin 'data' event triggers after a user types in a line | |
process.stdin.on('data', (userInput) => { | |
userInput = userInput.toString().trim(); | |
commands.evaluateCmd(userInput); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment