Join Joseph LeBlanc for an in-depth discussion in this video Gathering user input, part of Node.js First Look.
- View Offline
- Exercise Files
While some users will know what flags and options they want to set, others will…benefit from interactive prompts.…The readline module in Node allows you to create these interactive prompts.…So the script we have here is setup as a diet checker, we're going to check and…make sure that the users are eating enough fruits and vegetables in their diet.…This script is using the readline module.…Readline is a core module that is distributed with Node itself, you don't have…to install it using NPM.…Next, we're creating an interface using the createInterface method of…readline, we're passing in the standard input and standard output properties…of the current process.…
Once the interface is created, we can then use the question method to ask a question.…Our question is how many servings of fruits and vegetables do you eat each day?…The response from the user will be passed as an argument into this function,…then we have some logic.…If the number of servings is less than 5, we're going to tell them to eat more…
- Using the Socket.IO Node package to achieve "live" effects like Facebook notifications
- Scraping web sites using jQuery without a browser
Skill Level Beginner
XHTML and HTML Essential Trainingwith Bill Weinman4h 44m Beginner
1. Installing Node
2. Getting Started
Running a Node script2m 6s
4. Command Line Scripts
5. Creating Web Servers
7. WebSocket Programming
8. Connecting Beyond Node
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.