A Node.js module for asking questions and receiving an array of answers via a Promise object.
The module incorporates Node's readline.createInterface()
to coordinate a sequence of console based questions and recording their respective answers in an accessible array.
The file demo.js
under the demo folder provides a demo using the module. To run the demo:
-
Install the node_console_ask dependency. Enter the following in the terminal:
npm install
-
Run the Node.js application. Enter the following:
node demo.js
The application will ask three questions and respond with an array of answers.