Technology ideas from around the internet.Publishing documents on edocr is a proven way to start demand generation for your products and services. Thousands of professionals and businesses publish marketing (brochures, data sheets, press releases, white papers and case studies), sales (slides, price lists and pro-forma agreements), operations (specifications, operating manuals, installation guides), customer service (user manuals) and financial (annual reports and financial statements) documents making it easier for prospects and customers to find content, helping them to make informed decisions. #SEO #leadgen #content #analytics
RisingStack
1
NODE HERO
Get started with Node.js and deliver software products using it.
From the Engineers of
RisingStack
2
GETTING STARTED WITH NODE.JS
03
Table of contents
USING NPM
08
UNDERSTANDING ASYNC PROGRAMMING
12
USING DATABASES
22
THE REQUEST MODULE
28
PROJECT STRUCTURING
32
AUTHENTICATION USING PASSPORT.JS
35
UNIT TESTING
40
DEBUGGING
46
YOUR FIRST NODE.JS SERVER
17
SECURITY
50
DEPLOYING YOUR APPLICATION
55
MONITORING NODE.JS APPLICATIONS
60
RisingStack
3
GETTING STARTED WITH NODE.JS
We are going to start with the basics - no prior Node.js knowledge is
needed. The goal of this book is to get you started with Node.js and
make sure you understand how to write an application using it.
In this very first chapter, you will learn what Node.js is, how to install
it on your computer and how to get started with it - so in the next ones
we can do actual development. Let's get started!
Node.js in a Nutshell
The official Node.js logo
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Node.js uses an event-driven, non-blocking I/O model that makes it
lightweight and efficient.
In other words: Node.js offers you the possibility to write servers using
JavaScript with an incredible performance. As the official statement
says: Node.js is a runtime that uses the same V8 Javascript engine
you can find in the Google Chrome browser. But that wouldn't be
enough for Node.js's success - Node.js utilizes libuv, a multi-platform
support library with a focus on asynchronous I/O.
The official libuv logo
From a developer's point of view Node.js is single-threaded - but under the
hood libuv handles threading, file system events, implements the event
loop, features thread pooling and so on. In most cases you won't interact
with it directly.
Installing Node.js to get started
To get the latest Node.js binary you can visit the official Node.js
website: https://nodejs.org/en/download/.
RisingStack
4
With this approach it is quite easy to get started - however if later
down the road you want to a