background preloader

Node.js

Facebook Twitter

Node-oauth2-server. Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js Installation.

node-oauth2-server

How To Node - NodeJS. Building5/node-promirepl. Marionette.component. Manage and create components for your Marionette.js application Reusable Components in Marionette Marionette.Component is a library for creating reusable components in Marionette.js.

marionette.component

Marionette.Component offers an opinionated, standardized approach to creating components with your Marionette views. The library exposes an API for displaying components in Marionette regions and handles the entire view lifecycle inside the region. Installation Via npm. Connect-assets. Transparent file compilation and dependency management for Node’s connect framework in the spirit of the Rails 3.1 asset pipeline.

connect-assets

What can it do? Connect-assets can: Serve .js.coffee (CoffeeScript) files as compiled .jsConcatenate .js.coffee and .js together.Serve .css.styl (Stylus) as compiled .cssServe .css.less (Less) as compiled .cssServe .css.sass or .css.scss (SASS) as compiled .cssServe .jst.hamlc (Haml-Coffee templates) as compiled JavaScript functions.Serve .jst.jade (Jade templates) as compiled JavaScript functions (be sure to include the Jade runtime — see below).Serve .jst.ejs as compiled JavaScript functions.Preprocess style.css.ejs and script.js.ejs with EJS — just append .ejs to any file.Serve files with a cache-control token and use a far-future expires header for maximum efficiency.Avoid redundant git diffs by storing compiled .js and .css files in memory rather than writing them to the disk when in development.

How do I use it? Marionettejs/backbone.radio. Arunoda/meteor-up. How to Scale Meteor? I assume, you are using the lastest version of Meteor In the previous article, we looked at the problems and possible solutions for scaling Meteor applications.

How to Scale Meteor?

But I did not show you how to scale an app in practice. So, this article covers that. Scaling Set-up Our component diagram is: There are three Meteor servers, one MongoDB server and a HaProxy server as the load balancer. Arunoda/meteor-up. MeteorHacks - Meteor JS Tutorials, Hacks & Projects with @arunoda. Jedireza/drywall. Expressjs/csurf. Rkusa/co-bcryptjs. Tj/co. LearnBoost/mongoose. Mocha - the fun, simple, flexible JavaScript test framework. Jakearchibald/es6-promise. Blazon. Tschaub/grunt-newer. Shootaroo/jit-grunt. Sindresorhus/time-grunt. Stefanjudis/grunt-phantomas. Jrcryer/grunt-pagespeed. Dylang/grunt-notify. Jsoverson/grunt-plato. Addyosmani/grunt-uncss. Jscs-dev/node-jscs.

JSHint, a JavaScript Code Quality Tool. Jsinspect. Detect copy-pasted and structurally similar code.

jsinspect

The inspector identifies duplicate code, even if modified, as well as common boilerplate or logic that should be the target of refactoring. Overview We've all had to deal with code smell, and duplicate code is a common source. While some instances are easy to spot, this type of searching is the perfect use-case for a helpful CLI tool. Existing solutions do exist for this purpose, but are often token-based and rely on string searching methods such as the Rabin–Karp algorithm.

And copy-pasted code is but one type of code duplication. You have the freedom to specify a threshold determining the smallest subset of nodes to analyze. The tool accepts a list of paths to parse, and outputs any matches along with a series of 2-way diffs. Installation It can be installed via npm using: npm install -g jsinspect Usage Usage: jsinspect [options] <paths ...

> Duplicate code and structure detection for JavaScript. Sindresorhus/grunt-svgmin. Promises. Contributors to rwaldron/johnny-five. Front-End Development in Node.js - Raquel Vélez. Node.js & MongoDB Cloud Platform for Developers. PlayfulJS. Realtime MVC Framework for Node.js. Meteor. Getting Started. Installing hapi Create a new directory myproject, and from there: Run: npm init and follow the prompts, this will generate a package.json file for you.Run: npm install --save hapi this installs hapi, and saves it in your package.json as a dependency of your project.

Getting Started

That's it! You now have everything you need in order to create a server using hapi. Creating a server The most basic server looks like the following: First, we require hapi. When creating the server object, we can also provide a hostname, IP address, or even a Unix socket file, or Windows named pipe to bind the server to. Adding routes Now that we have a server we should add one or two routes so that it actually does something. Docker - Build, Ship, and Run Any App, Anywhere. Krakenjs - Give your node.js express apps some extra arms.

Rvagg/learnyounode. 2014 Schedule / Nodevember / Nashville, TN / November 15th - 16th. Nodebot-workshop. Getting Started. LEDs (light emitting diodes) are used in all sorts of clever things which is why they are included in the Experimenter's kit.

Getting Started

We will start off with something very simple, turning one on and off, repeatedly, producing a pleasant blinking effect. To get started, grab the parts listed below, pin the circuit layout sheet to your breadboard using the header pins and then plug everything in. Make sure your Arduino is disconnected from the computer whenever you are connecting or disconnecting components. Plug the Arduino in, and run the program from the node-ardx directory as follows: Code Archives - the evolving ultrasaurus. It has been surprisingly hard to find a very simple tutorial to get started with Express, along with some common helpful tools, including tests!

code Archives - the evolving ultrasaurus

Here’s a little tutorial for Node.js v0.10 and Express 4. I’m learning Express, since I’m working on an app in SailsJS, so I will pick options that mirror choices made by the SailsJS framework. Install Express Express is a popular simple web app framework for Node (similar to Sinatra for Ruby), and is easily instally with the fabulous Node Package Manager, npm. I find the generators to be handy (at least for learning) and don’t ship with Express anymore, so you need to install them separately. Converting dynamic SVG to PNG with node.js, d3 and Imagemagick.

Visitors to Wealthfront might notice we're using SVG to render the risk meter in our questionnaire, as well as your performance projection and other charts.

Converting dynamic SVG to PNG with node.js, d3 and Imagemagick

We build our visualizations using d3.js, a fantastic library that provides just the right amount of abstraction on top of SVG to allow us to develop robust visualizations quickly. SVG is attractive as a vector format, and animations are simple. However, as most are aware, SVG is not supported in some older browsers - notably IE 8 and below. Creating Desktop Applications With node-webkit. Web applications are useful, but there are some cases where it’s not desirable or necessary to host an application on a remote server.

As HTML5 provides low-level functionality to modern browsers, such as the ability to read and write files, it’s now possible to create offline, single-page, JavaScript applications using a web browser as a platform. While browser-based unhosted applications present some interesting possibilities, such as the ability to deploy your application on multiple operating systems, there are some significant limitations. When using browsers one’s control of the user interface is limited. Some interface elements, such as pull-down menus, can’t be customized and there is usually no way to hide the browser’s address bar programatically. Node.js.

Ryan Dahl: Original Node.js presentation. Intro to Node.js. The Beautiful Broken Web: Node.JS Security - the good, bad and ugly. At the moment, dev world is full of rave about Node and server side JavaScript (databases like MongoDB and the likes).

The Beautiful Broken Web: Node.JS Security - the good, bad and ugly

There hasn't been a better time for front-end and JS developers. On the first look - it appears great, promising and exciting. On the down side, as with most upcoming technologies, there isn't enough security analysis, consideration and advisory to reference and understand gotchas with server side JS. Nothing wrong with that - it's functions, coolness and innovation that brings business and not security (history/economics is a testimony). In this post, I will share my security view point as I see it. Node.js Explained. Node-RED. Stream Node.js v0.10.0 Manual. Stability: 2 - Unstable A stream is an abstract interface implemented by various objects in Node.

For example a request to an HTTP server is a stream, as is stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter You can load the Stream base classes by doing require('stream'). About. In the "hello world" web server example below, many client connections can be handled concurrently. Node tells the operating system (through epoll, kqueue, /dev/poll, or select) that it should be notified when a new connection is made, and then it goes to sleep. If someone new connects, then it executes the callback. Each connection is only a small heap allocation. This is in contrast to today's more common concurrency model where OS threads are employed. Thread-based networking is relatively inefficient and very difficult to use. Node is similar in design to and influenced by systems like Ruby's Event Machine or Python's Twisted.

Node.js Blog. Node.js tutorial for beginners - an introduction to Node.js with Express.js. Jade - Template Engine. On this page: doctype To add a doctype use doctype followed by an optional value (which defaults to html). The shorthand !!! Stylus — expressive, robust, feature-rich CSS preprocessor. Express. Fast, unopinionated, minimalist web framework for node. var express = require('express');var app = express(); app.get('/', function(req, res){ res.send('Hello World');}); app.listen(3000); PROTIP Be sure to read Migrating from 3.x to 4.x as well as New features in 4.x. Installation $ npm install express Quick Start The quickest way to get started with express is to utilize the executable express(1) to generate an application as shown below: Npm. Async. Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript.

DOM Based XSS. DOM based XSS Prevention Cheat Sheet. Using Yeoman to Create a Web Application. ← Big Data Roundup | Meteor Web Application Creation → A guest post by Jonnie Spratley, who currently works for GE as a UI Developer on the Industrial Internet Team building user interfaces for next generation products, and teaches a variety of programming courses at AcademyX.