Introducing
Your new presentation assistant.
Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.
Trending searches
Site Organ
SiteContent Cells
Blood
AdminSiteContent Cells
ObjectTypes ( Error, MyChemical & etc... )
Strings ( matches chemical.type )
{
"membrane" : [
"path" : "./httpServer",
"port" : 8080
],
"plasma" : [
"./plasma/pageRouter",
"./plasma/pageRender"
]
}
{
type: "incomingHttpRequest",
req: RequestObject,
}
var util = require("util");
var Organel = require("organic").Organel;
var Chemical = require("organic").Chemical;
module.exports = function LogHandler(plasma){
Organel.call(this, plasma);
this.on("log", function(chemical){
console.log("LOG:".blue+chemical.data);
});
}
util.inherits(module.exports, Organel);
emits incoming requests as Chemicals
responds to outgoing Chemicals as response
@obiwon
git clone git://github.com/creationix/nvm.git ~/.nvm
. ~/.nvm/nvm.sh
nvm install v0.8.1
nvm use v0.8.1
main.js
require("myModule")
script.js
require("express")
server-side apps
command line apps
desktop apps (!) :)
<root folder>
| - main.js
| + node_modules
| - myModule.js
| + express
| - index.js
| + node_modules
| + cookieParser
| + lib
| - index.js
| - package.json
express / index.js
require("cookieParser")
$ node myscript.js
<root folder>
| - script.js
| - module.js
| - Class.js
http://nodejs.org/api/modules.html#modules_all_together
package.json
node_modules
"name" : "MyPackage",
"version" : "0.0.1",
"main" : "./lib/index.js",
"bin" : {
"command": "./bin/command.js"
},
"dependencies" : {
"express": "latest",
"socket.io": "0.4.1"
}
| + lib
| - index.js
| + bin
| - command.js
process
cluster
child_process
11.08.2012
Tower.js
substack
fs
http & https
net
node-browserify
RailwayJS
indexzero
Connect
dnode
Meteor
api-easy
Derby
Stream
visionmedia
LearnBoost
jade
expressjs
Buffer
EventEmitter
socket.io
engine.io
console
async
module.js
Class.js
"dependencies" : {
"express": "latest",
"socket.io": "latest"
}
var Class = function(){
console.log("instance created");
}
module.exports = Class;
{ "type": String, ... }
module.exports.start = function(){
console.log("module started");
}
var module = require("./module");
module.start();
var Class = require("./Class");
var instance = new Class();