How can I capture user input so that every time they type in a command I send that command as an API request?
I am building a cli with Node.js and and need to make my program send a post request after every time a user enters a command. How can I capture this user input every time?