NodeJS

Facebook Twitter

Node.js 日本ユーザグループ. Npm - Node Package Manager. Nipster! npm search tool for Node.js. Express - node web framework. Nodetime - Performance Profiler for Node.js. Mongoose ODM. CommonJS: JavaScript Standard Library. Packages/1.0 - CommonJS Spec Wiki. Implementations JSBuild, PINF JS Loader, ArangoDB Packages This specification describes the CommonJS package format for distributing CommonJS programs and libraries.

Packages/1.0 - CommonJS Spec Wiki

A CommonJS package is a cohesive wrapping of a collection of modules, code and other assets into a single form. It provides the basis for convenient delivery, installation and management of CommonJS components. This specifies the CommonJS package descriptor file and package file format. Package Descriptor File Each package must provide a top-level package descriptor, "package.json".

Required Fields Each package must provide all the following fields in its package descriptor file: name the name of the package. Description a brief description of the package. Version a version string conforming to the Semantic Versioning requirements ( keywords an Array of string keywords to assist users searching for the package in catalogs. maintainers Array of maintainers of the package. Contributors bugs URL for submitting bugs.

Licenses repositories "os" Felix's Node.js Guide. Node v0.2.6 한글 번역. Felix's Node.js Style Guide/en. « Home / All Guides IMPORTANT: This version is outdated, the latest version is available on GitHub.

Felix's Node.js Style Guide/en

There is no official document that governs the style of node.js applications. This guide is my opinionated attempt to bring you a good set of instructions that will allow you to create beautiful and consistent software. This guide assumes that you are only targeting node.js. If your code also needs to run in the browser or other environments, please ignore some of it.

Please also note that node.js, as well as various packages for it, have their own slightly different styles. Tabs vs Spaces Let's start with the religious problems first. Semicolons There are rebellious forces that try to steal your semicolons from you. Editors You can use any editor. I'm typing this document in Notes on my iPad, but that's because I'm on a beach in Thailand. Trailing whitespace Just like you brush your teeth after every meal, you clean up any trailing whitespace in your JavaScript files before committing. Quotes. Felix's Node.js Style Guide/ko. GitHub - Social Coding. Outsideris/node.js-programming. Building and Installing Node.js · joyent/node Wiki. Building and installing Node.js You may build the Node.js engine for any of the supported platforms.

Building and Installing Node.js · joyent/node Wiki

For Windows and Mac some pre-built binaries are available; you may install them without building Node for yourself. Prerequisites and known issues of building Prerequisites GCC 4.2 or newerGNU make 3.81 or newer. Known Issues On UNIX platforms, make sure that the path doesn't contain whitespace: /home/user/My Projects/node won't work. If you receive an error during . File "/home/flo/node-v0.6.6/tools/waf-light", line 157, in <module> import Scripting File "/home/flo/node-v0.6.6/tools/wafadmin/Scripting.py", line 146 except Utils.WafError, e: ^ SyntaxError: invalid syntax it is because Python3 is your default Python version. Export PYTHON=`which python2` Maybe you need to change your PYTHONHOME as well. Cd /usr/local/bin ln -s /usr/bin/python2 python ln -s /usr/bin/python2-config python-config Remember to remove the symlinks when you're done.

Make LINK=g++ Building on GNU/Linux and other UNIX . Nanha/nodeman. Instagram/node2dm. Node.js Manual. Nodeman by nanha. Mastering Node. Node is an exciting new platform developed by Ryan Dahl, allowing JavaScript developers to create extremely high performance servers by leveraging Google's V8 JavaScript engine, and asynchronous I/O.

Mastering Node

In Mastering Node we will discover how to write high concurrency web servers, utilizing the CommonJS module system, node's core libraries, third party modules, high level web development and more. In this chapter we will be looking at the installation and compilation of node. Although there are several ways we may install node, we will be looking at homebrew, nDistro, and the most flexible method, of course - compiling from source. Homebrew Homebrew is a package management system for OSX written in Ruby, is extremely well adopted, and easy to use. . $ brew install node.js nDistro nDistro is a distribution toolkit for node, which allows creation and installation of node distros within seconds. . $ cd /usr/local/bin && curl | sh $ ndistro Building From Source $ git clone && cd node $ . Creating Modules. The Node Beginner Book (Korean version) » A comprehensive Node.js tutorial. Twich: php + node.js realtime web-based chat.

Twich was first mentioned back in July when the author, Isaac Su, posted a news item to Hacker News titled “I made a browser-based chat app.

twich: php + node.js realtime web-based chat

Based on node.js and nodechat.”. Yesterday (October 27, 2010), Isaac posted another news item to Hacker News titled “Remember twich.me (node.js realtime chat)? Here is the source as promised.”, officially open sourcing his code for all the world to see. Isaac does mention in the #readme that Twich is based on node_chat by Ryan Dahl Installation See the #readme for more details. www/ www/ is a set of php scripts that serve up the client files and organize the rooms. First, create a vhost in Apache and point it to this folder. Then, copy www/_config.php.sample to www/_config.php and enter your own configuration settings.

Var $port = 443; var $domain = ''; var $analyticsAccount = ''; var $analyticsDomainName = ''; Finally, edit .htaccess and put your own domain name in instead of twich.me Congrats www/ is all setup node/ node/ is the actual node server. Real-time web applications with Node.js, Socket.io & TerrificJS – Roger Dudler's Blog. Async. and Realtime Geo Applications with Node.js. Man online - npm-config (1) Npm-config -- Manage the npm configuration file npm config set <key><value> [--global] npm config get <key> npm config delete <key> npm config list npm config edit npm get <key> npm set <key><value> [--global] npm gets its configuration values from 5 sources, in this priority: cli: The command line flags.

Man online - npm-config (1)

Putting --foo bar on the command line sets the foo configuration parameter to "bar". A -- argument tells the cli parser to stop reading flags. Env: Any environment variables that start with npm_config_ will be interpreted as a configuration parameter. $HOME/.npmrc (or the userconfig param, if set above): This file is an ini-file formatted list of key = value parameters. $PREFIX/etc/npmrc (or the globalconfig param, if set above): This file is an ini-file formatted list of key = value parameters default configs: This is a set of configuration parameters that are internal to npm, and are defaults if nothing else is specified. Sub-commands Config supports the following sub-commands: set get list.

How To Node - NodeJS. Install node.js without using sudo « Nurture your inner geek. Update: 2012/02/21 As Jonathan pointed out below, the information in this post has been made obsolete by the now supported ‘–prefix’ option in the Node.js configure scripts.

Install node.js without using sudo « Nurture your inner geek

As the instructions point out: . /configure --prefix=/your/chosen/path The preceding code should be sufficient to install Node.js as a local user, and without a need for sudo. The original post is being left intact for posterity (pun maybe intended) and because it has become the the most popular on this blog to date. The default installation instructions for node.js require using sudo, in most cases. As Julian Gautier pointed out, the “git clone” commands in this post will clone the master branch (bleeding edge development version) of node. If you need backwards compatibility, you may want to clone the v2 branch.

Thanks to Julian for pointing this out! Short version: $ git clone $ cd node $ mkdir ~/opt $ export PREFIX=~/opt; . Enjoy. If those commands seem obtuse, keep reading, all will be explained in the Long version. $ . Essential Node.js patterns and snippets. In this post, I take a look at the different patterns that you need to know when using Node.js.

Essential Node.js patterns and snippets

These came from my own coding and from a look at the code behind Tim Caswell’s flow control libraries. I think it is necessary to know how these basic patterns are implemented even if you use a library.. 1.1 Class pattern If the class is long, then instead of doing a single Class.prototype = {…} assignment, it may be split into multiple Class.prototype.method = function () {..} assignments. Reminder: Assign all your properties some value in your constructor. 1.2 Accessing global values from objects // constructorvar Class = function(global, value2) { this.global = global;}// access using this.global in class methods 1.3 Factory pattern // Constructorvar Class = function(value1, value2) { ... }// FactoryClass.factory(value1) { return new Class(value1, "aaa"); }// properties and methodsClass.prototype = { ... }; 1.4 Sharing state between modules 1.5 Singleton class (added Feb 2011) 2.1 Parsing GET 4.

Top News - Echo JS. Node.js. NodeCloud - Node.js resources.