Introduction to Node.js
Learn about the different components of a web application's back-end and explore the Node.js JavaScript runtime environment.
StartKey Concepts
Review core concepts you need to learn to master this subject
Node.js REPL
Node.js Global Object
Node.js Process Object
Node.js process.argv
Node.js process.memoryUsage()
Node.js Modules
Node.js Core Modules
Node.js Local Modules
Node.js REPL
Node.js REPL
//node is typed in the console to access REPL
$ node
//the > indicates that REPL is running
// anything written after > will be evaluated
> console.log("HI")
// REPL has evaluated the line and has printed out HI
HI
Node.js comes with REPL, an abbreviation for read–eval–print loop. REPL contains three different states:
*a read state where it reads the input from a user, *the eval state where it evaluates the user’s input *the print state where it prints out the evaluation to the console.
After these states are finished REPL loops through these states repeatedly. REPL is useful as it gives back immediate feedback which can be used to perform calculations and develop code.
- 1In this lesson, we’ll explain what makes up the back-end of a web application or website. The back-end can feel very abstract, but it becomes clearer when we explain it in terms of the front-end! T…
- 2We talked about how the front-end consists of the information sent to a client so that a user can see and interact with a website, but where does the information come from? The answer is a _web ser…
- 3When a user navigates to google.com, their request specifies the URL but not the filename for today’s Google Doodle . The web application’s back-end will need to hold the logic for deciding which …
- 4You’ve probably heard that data is a big deal. By some measures, 90% of the world’s data has been generated in just the past two years! From a stored credit card number on an e-commerce site to the…
- 5When a user navigates to a specific item for sale on an e-commerce site, the price listed for that item is stored in a database, and when they purchase it, the database will need to be updated with…
- 6Two other concepts we’ll want our server-side logic to handle are authentication and authorization. Authentication is the process of validating the identity of a user. One technique for aut…
- 7Unlike the front-end, which must be built using HTML, CSS, and JavaScript, there’s a lot of flexibility in which technologies can be used in order to create the back-end of a web application. Devel…
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory