Skip to content

Latest commit

 

History

History
executable file
·
54 lines (29 loc) · 2.46 KB

w3_d2_intro_to_node.md

File metadata and controls

executable file
·
54 lines (29 loc) · 2.46 KB

Intro to Node

##Opening: What is node?

JavaScript is a just a client-side programming language that runs in the browser, right? Not any more. Node.js is a way of running JavaScript on the server; but it’s so much more as well.

When was it made?

Node.js was created and first published for Linux use in 2009. Its development and maintenance was spearheaded by a guy called Ryan Dahl.

What is npm?

npm, a package manager for Node.js libraries, was introduced in 2011.

npm is Node's package manager. It's used to manage dependencies. Think of it like RubyGems.

Why was Node created?

Dahl was inspired to create Node.js after seeing a file upload progress bar on Flickr. The browser did not know how much of the file had been uploaded and had to query the Web server. Dahl desired an easier way.

Javascript in the back-end

Node.js® is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

What is Node?

Node is an interface to the V8 JavaScript runtime – the super-fast JavaScript interpreter that runs in the Chrome browser. As it happens, you can also download V8 and embed it into anything; Node does that, for web servers. JavaScript is after all, just a language – there’s nothing that says it couldn’t be used on a server as well as in the user’s browser.

Why use Node?

Firstly, for performance and scalability. Node is fast. That’s a pretty important requirement when you’re a start-up trying to make the next big thing and want to make sure you can scale quickly, coping with an influx of users as your site grows. Node is also perfect for offering a RESTful API - a web service which takes a few input parameters and passes a little data back – simple data manipulation without a huge amount of computation.


##We Do: Installing Node

Installing with the downloader, (click install & run the installer):

https://nodejs.org/

Installing with homebrew?

Installing with homebrew. It is possible to install with brew. However, there are a few issues that come about when updating packages.


##Closure

Node is the new "cool" new thing to get into. People think that technically it is really advanced, which it is. However, this doesnt mean that it needs to be difficult.