background preloader

Node.js

Facebook Twitter

NodeSchool. Using Phaser with Visual Studio Code. NodeSchool. Maxogden/art-of-node. MongoDB Tutorial.

Advanced tutorials

Hapi. Event Emitters in NodeJs. In this tutorial we will be exploring the built-in events module in NodeJs and particularly the EventEmitter class through a couple of practical examples.

Event Emitters in NodeJs

I'll start off by showing you how to create an instance of the EventEmitter and then move on to building our own Node module which inherits from the EventEmitter. So what exactly are event emitters? In NodeJs, any object that emits an event is an instance of the EventEmitter class which exposes 2 important functionalities: The ability to trigger events using eventEmitter.emit(someEvent, optionalData)The ability to assign one or more event handlers to a specific event using eventEmitter.on(someEvent, eventHandler) Let's start off with a simple example to illustrate how an instance of the EventEmitter class can be created and used to listen to and trigger events.

We'll create a function to randomly select a string from an array and trigger an event with this string as the data. Received the string: coligo.io const PubSub = require('.

Koa.js

Top 10 Mistakes Node.js Developers Make. GitHub - auth0-blog/nodejs-jwt-authentication-sample: A NodeJS API that supports username and password authentication with JWTs. An early look at three high-impact ES6 features coming soon to Node.js - RethinkDB. Google is currently developing V8 4.9, which will ship in the upcoming Chrome 49 release.

An early look at three high-impact ES6 features coming soon to Node.js - RethinkDB

V8 4.9 is a particularly exciting update, because it includes support for 91% of the ECMAScript 2015 (ES6) standard. When Node.js 6 launches with these V8 improvements, powerful new language features like destructuring assignment and proxies will work out of the box–without requiring special measures like command line flags or transpilers. Although Node 6.0 isn’t scheduled for release until April, you can experience a little bit of the future today by compiling Node’s vee-eight-4.9 branch from source code. The vee-eight branches are where Node’s maintainers do the heavy lifting to make Node compatible with new versions of V8. The code from these branches is understandably not suitable for use in production environments, but it’s a fun a way to get an early look at coming improvements.

The example above creates a rank variable that contains the value of the person object’s rank property. Resources: Maxogden/art-of-node. How do I get started with Node.js. Node.js Tutorials. Node.js Stream Playground. Express - api reference. Hosting Node Apps. This tutorial walks you through setting up a server that can host node.js apps for server-side JavaScript applications.

Hosting Node Apps

Right now, the node.js hosting options boil down to running node daemon processes that talk to a web server. Most web servers can proxy connections to a different port, so you’ll be able to use Apache or nginx to do this. Step 1: Get a Server or VM. Production Practices - Developer Center. How We Built eBay’s First Node.js Application — eBay Tech Blog. For the most part, eBay runs on a Java-based tech stack.

How We Built eBay’s First Node.js Application — eBay Tech Blog

Our entire workflow centers around Java and the JVM. Considering the scale of traffic and the stability required by a site like ebay.com, using a proven technology was an obvious choice. How To Set Up a Node.js Application for Production on Ubuntu 14.04. Introduction Node.js is an open source Javascript runtime environment for easily building server-side and networking applications.

How To Set Up a Node.js Application for Production on Ubuntu 14.04

The platform runs on Linux, OS X, FreeBSD, and Windows, and its applications are written in JavaScript. Node.js applications can be run at the command line but we will teach you how to run them as a service, so they will automatically restart on reboot or failure, so you can use them in a production environment. Running Node.js apps in production. Frederic Hemberger @fhemberger Topics I'll talk about today: Deployment Run Node.js (and keep it running) Metrics Deployment Deployment Different popular deployment techniques: Git Hooks GitHub Webhooks Capistrano, Fabric, deploy.sh, et. al.

Running Node.js apps in production

Git Hooks Pushing to Git remote on your server cd /var/www/myapp.com git pull npm install --production service myapp restart ... NodeJS Cheat Sheet. Advanced nodejs. Node Tuts. 3 Easy Steps to Get The Most from MongoDB and Node.JS. Void Canvas. Authentication using Google’s oAuth api with node.js. OAuth authentications are pretty popular now a days and another thing which is popular is JavaScript.

Authentication using Google’s oAuth api with node.js

This article shows how to plugin google’s oAuth api for authentication in your own node application. The github repo is also available. A background of oAuth OAuth is an authentication technique which provides you a secure and delegate access to some server resources on behalf of the resource owner. This is a very commonly used technique in third party websites to authenticate a user via his/her facebook, twitter or google account, without disclosing the password and also without taking the headache of storing user credentials in their websites. Get the client-id and client-secret To use oAuth (or any other api) of google you need to create an app in google developers console. Tutorial - Getting Started With Node.js, Express, MongoDB. Creating a Simple RESTful Web App with Node.js, Express, and MongoDB. How To Node - NodeJS. Build a Complete MVC Website With ExpressJS. In this article we'll be building a complete website with a front-facing client side, as well as a control panel for managing the site's content.

Build a Complete MVC Website With ExpressJS

As you may guess, the final working version of the application contains a lot of different files. I wrote this tutorial step by step, following the development process, but I didn't include every single file, as that would make this a very long and boring read. However, the source code is available on GitHub and I strongly recommend that you take a look. Npm. Charts. Write a todo list with Express and MongoDB. A todo list website is a good practice to learn a programing language or a framework.

Write a todo list with Express and MongoDB

It shows you how to create, read, update and delete records. In this post we are going to use Express as our application framework and MongoDB as our data store. The latest Express 4.x is a little different from 3.x used in the article. I updated the example code on Github. Front-End Development in Node.js - Raquel Vélez. Turtle Philosophy: Fixing missing VCBuild.exe. From the yeoman generator for angular, when installing socket.io: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".

Turtle Philosophy: Fixing missing VCBuild.exe

To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location ofthe component to the system path if it is installed elsewhere. These instructions may be useful when encountering less helpful messages about a missing "VCBuild.exe" file in other programs. You can download the .NET framework v2.0 SDK here. You can download the Visual C++ 2005 ISO from the link in this blog post. Node.js - How do Express and hapi compare to each other? Node.js Frameworks: The 10 Best for Web and Apps Development. Running JavaScript outside the browser turned out to be quite magical for JavaScript lovers and is definitely one of the most welcomed moves in the world of web applications development. Developers all around the globe embraced NodeJS with arms wide open. For those who are new, Node.JS is the JavaScript runtime that allows you to run JavaScript code on the server, outside the browser.

It is built on top of Google Chrome’s V8 VM engine that supports JavaScript in the chrome browser. The pace at which NodeJS grew in popularity is due to the fact that it allows you to build large scale, real time and scalable mobile and web applications with JavaScript alone. As the node ecosystem grew, the frameworks also started to surface up to speed up the development workflow. The less opinionated node frameworks like Express, Koa and Hapi are more flexible and let you do everything the way you want and are best suited for grounds up development. 15 Best Node.js Tools for 2015. Node.js is really getting popular + being used more and more each day and it deserves this attention with the flexibility and performance if offers.

Node.js is a server-side JavaScript environment that uses an asynchronous event-driven model. JavaScript is mostly ran/rendered on the client-side, in the browsers. GitHub - kin9puppy/vcbuildFixForNode: fix for vcbuild.exe error on node. Jade - Template Engine. How to install Node.js on managed hosting accounts. This article describes how to install the Node.js platform on managed hosting accounts (please see the Article Details sidebar to the right for a complete list of supported products). You can use Node.js to host third-party applications or you can run your own applications. Installation prerequisites There are two prerequisites for running Node.js on a managed hosting account: Your account must have the normal shell (not jailshell) enabled. To determine which shell your account is using, log in using SSH, and then type the following command: echo $SHELL If your account is using jailshell, please open a support ticket on the Customer Portal at and request normal shell access for your account.Node.js currently only works on servers running CentOS 6.

Npm. The Node Beginner Book » A comprehensive Node.js tutorial. Felix's Node.js Beginners Guide. « Home / All Guides There is lots of information about node.js, but given the rapid pace at which it is developing, it can be difficult for beginners to find good, current information on how to get started. This guide aims to provide exactly that, whilst staying updated with the latest stable version of node.js. How to run Hello World - Nodejs. Plans and Pricing - OpenShift Online. What is Node.js Exactly? - a beginners introduction to Nodejs. Develop desktop app using Node-webkit. Express. Tutorial - Getting Started With Node.js, Express, MongoDB. Express - Node.js web application framework. Simple CRUD Node.js & MySQL.

Please Share this to your social media if this is useful for you. Don't forget to read this Post... In this tutorial i am trying to cover code for learning and code for production. So if you know this already and looking for ready made code for production.