Node.js Flashcards
What is Node.JS?
Allows the creation of a backend using Javascript
Fast execution on the backend
Allows Javascript to be run outside of the browser, independently, and to allow Javascript code to interact directly with the computer, that will allow it to access files, listen to network requests, …
Allows the creation of full desktop applications using Javascript
Allows the execution of Javascript programs on the server
All of the heavy calculations and executions happen on the server, rather than the client’s browser
The Node REPL
REPL
Read
Evaluation
Print
Loops
How to Use the Native Node Modules
Check out the different types of API’s on nodejs.org/API/ Accessing File Systems Create a file system object Example: const fs = require(“fs”); require(); Not part of standard Javascript In NodeJs, a built in function to load modules into the javascript code
The NPM Package Manager and Installing External Node Modules
Followed by accompanying cards
NPM
(Node Package Manager)
Package managers for external modules
Gets bundled with Node
Creating your own Package
run node init and follow the steps
It will create a package.json file
Downloading an external node module
Find the module you want from searching from npmjs.com Check the usage, usually it is in the form of npm install