From the course: Node.js: Web Servers, Tests, and Deployment
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Using tiny-timer - Node.js Tutorial
From the course: Node.js: Web Servers, Tests, and Deployment
Using tiny-timer
- [Instructor] All right, let's continue to work with our little timer app. I want to make sure that we are navigated to the correct folder first. Looks like we are and then we'll run node index. Now, if you ever see this error, cannot find package, it's just because you have to run an npm install again inside of this folder. The next thing we'll do is run it again and we should see that this is running. Remember, we have to pass a time flag and then we should get that value back. We'll take another look over here at the npm registry. I'm going to look for something called tiny-timer. Tiny-timer is a countdown timer that we can use to call a few different functions. So we have our timer.on function. Every little tick is going to console.log that message. So what we are really looking to do is we'll collect this value from our users, and then we're going to pump it into these functions. The first thing we want to do is…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.