background preloader

An Absolute Beginner's Guide to Node.js

An Absolute Beginner's Guide to Node.js
There's no shortage of Node.js tutorials out there, but most of them cover specific use cases or topics that only apply when you've already got Node up and running. I see comments every once and awhile that sound something like, "I've downloaded Node, now what?" This tutorial answers that question and explains how to get started from the very beginning. What is Node.js? A lot of the confusion for newcomers to Node is misunderstanding exactly what it is. The description on nodejs.org definitely doesn't help. An important thing to realize is that Node is not a webserver. Installing Node Node.js is very easy to install. I've Installed Node, now what? Once installed you'll have access to a new command called "node". $ node > console.log('Hello World'); Hello World undefined In the above example I typed "console.log('Hello World')" into the shell and hit enter. The other way to run Node is by providing it a JavaScript file to execute. hello.js console.log('Hello World'); $ node hello.js Hello World

http://blog.modulus.io/absolute-beginners-guide-to-nodejs

Related:  Introduction to Node.js and why it's faster than JavaPHP / JSJavaScript Coding

What Makes Node.js Faster Than Java? Every few weeks someone posts a Java vs Node benchmark, like PayPal’s or Joey Whelan’s. As one of maintainers of Node core and contributors to many npm modules, StrongLoop is happy to see Node winning lately. Everyone knows benchmarks are a specific measurement and don’t account for all cases. Sometimes Java is faster. Meteor Tutorial In this tutorial, we are going to create a simple app to manage a 'to do' list and collaborate with others on those tasks. To create the app, open your terminal and type: meteor create simple-todos This will create a new folder called simple-todos with all of the files that a Meteor app needs: simple-todos.js simple-todos.html simple-todos.css .meteor To run the newly created app:

Node.js, Module.Exports and Organizing Express.js Routes A while ago I wrote a post explaining how require and module.exports work. Today I wanted to show a practical example of how we can use that knowledge to organize routes in an express.js project. To recap the original post, module.exports is how we make something within our file publicly accessible to anything outside our file. We can export anything: a class, a hash, a function or a variable. Java EE threads v/s Node.js - which is better for concurrent data processing operations We have started using NodeJS a lot these days typically to handle data processing applications that involve a large number of concurrent requests, each of which involve one or more I/O operations. Why Nodejs? Why not Java?

Understanding JavaScript Function Invocation and "this" Over the years, I've seen a lot of confusion about JavaScript function invocation. In particular, a lot of people have complained that the semantics of this in function invocations is confusing. In my opinion, a lot of this confusion is cleared up by understanding the core function invocation primitive, and then looking at all other ways of invoking a function as sugar on top of that primitive. Drywall - A website and user system for Node.js The Front-End Pages Home, about, sign-up and contact us. Authentication Screens

What is Node.js? Node.js is an event-driven, non-blocking I/O model. It is a server side JavaScript environment that is based on the V8 JavaScript Engine developed by Google.The V8 JavaScript Engine allows Chrome to run Javascript code much faster. It is able to do this by compiling the JavaScript directly into native machine code. Other browsers interpret JavaScript, or execute it as byte code. 15 Best Websites to Learn JavaScript JavaScript is the most happening language for the web. JavaScript is now a must learn language for any web developer. Innovation such as trace trees have greatly improved JavaScript’s performance and it is gaining popularity among all developers.

Building a Login System in Node.js and MongoDB This past week I finally got around to playing with Node.js and am really impressed with how simple it was to get a server and database up and running in literally minutes. Once there, I thought a good first project to explore the platform would be to try building a simple login system analogous to what I feel like I’ve built a million times in mysql & php. So after thinking about it a bit, I knew these were the basic features I wanted to implement : Login Panel Just a simple login panel with the ability to reset a lost password and of course the ability to create an account for first time users.An option to “remember me” that saves the user’s data in a local cookie allowing them to bypass the login screen whenever they revisit the site.

50 Amazing jQuery Plugins That You Should Start Using Right Now Martin Angelov jQuery has a wonderful community of programmers that create incredible things. However, it may become difficult to sift through everything that is released and find the gems that are absolute must-haves. This is why, in this post, you will find a collection of 50 new jQuery plugins and JavaScript libraries that, when applied with good measure, can make your sites a joy to use. Understanding the node.js event loop So the largest waste with current programming technologies comes from waiting for I/O to complete. There are several ways in which one can deal with the performance impact (from Sam Rushing): The second basis thesis is that thread-per-connection is memory-expensive: [e.g. that graph everyone showns about Apache sucking up memory compared to Nginx] Apache is multithreaded: it spawns a thread per request (or process, it depends on the conf). You can see how that overhead eats up memory as the number of concurrent connections increases and more threads are needed to serve multiple simulataneous clients.

Learn JavaScript Online - A Guide This is an excellent open sourced series that goes deep into the JavaScript language, and it includes tutorials for ES6 as well! When authoring this book, Kyle Simpson, the primary author of this series, has received help from many JavaScript experts, including the creator of JavaScript himself. This JavaScript tutorial series aims to challenge existing preconceptions about JavaScript.

Related: