Hi,
I want to create something similar to Heroku (first I was thinking in EngineYard-like but I prefer Heroku) for node.js (I know they already support node.). However, It's for a personal project so it doesn't need to be anything overcomplicated or super expensive. I believe I can learn a lot creating a product like this.
Before I sta...
How is node handling events?
One at the time, or concurrent?
I need to know, if there is going to be concurrent access to a shared array, like in the following example:
var ws = require("./ws.js"),
connections = [];
ws.createServer(function( socket ){
// add to connection array
socket.on('connect', function(){
c...
There are a lot of frameworks for the frontend:
jQuery
Prototype
Mootools
YUI
ExtJS
Dojo
Could these be used on the server side to extend Javascript native classes for example:
object2 = object1.clone();
And is this a good way of extending Javascript?
Cause I don't want to create every basic function I need but lacks from Javascr...
I can't get YUI3 to work on node.
I have installed all dependencies according to this site: http://github.com/yui/nodejs-yui3.
Here is my code:
var jsdom = require("jsdom").jsdom,
window = jsdom("<html><head></head><body>hello world</body></html>").createWindow();
var puts = require("sys").puts;
var YUI = require("yui3").YUI;
v...
Does process have at least one thread running?
If so, then the Node.js will by default have 1 main thread and 1 event loop thread running?
...
Hey all,
Consider the following code:
var meryl = require('meryl'),
merylex = require('meryl-extras'),
staticfile = merylex('staticfile'),
httpserv = require('http');
meryl.p('GET /static/<filepath>', staticfile({root: 'static', path: 'filepath'}));
httpserv.createServer(meryl.cgi()).listen(3000);
This works great, until you ...
I'm using YUI3 on node.js but I get all these INFO messages.
How do I deactivate them?
...
Is there some cron like library that would let me schedule some function to be ran at certain time (15:30 for example, not x hours from now etc)? If there isn't this kind of library how this should be implemented? Should I just set callback to be called every second and check the time and start jobs scheduled for the time or what?
...
All,
Trying to install NPM using the commands from here: http://howtonode.org/introduction-to-npm
Specifically, when I run:
curl http://npmjs.org/install.sh | sh
This is the error I get...
node cli.js cache clean
TypeError: Object #<an EventEmitter> has no method 'on'
at Object.<anonymous> (/home/sanjay/npm-1285345468/lib/utils/rm-r...
I heard a speaker described Node.js as a webserver that "efficiently does nothing". I thought it was a joke but others looked to nod agreement. Can someone explain my misunderstanding of this phrase?
...
I want to build video/audio chat application for my one of the social apps.Is there any library are available in java or ruby or node.js that can help us to build audio/video chat application.
Or any suggestion/technical article that help us to build video chat application.
...
I know that with Node.js you can stream data.
But why doesn't this code work:
var sys = require('sys'),
http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.write("hello");
res.write("world");
}).listen(80);
Seems that I have to have res.end() after the las...
Hi,
I'm trying to create a server app in node.js, where multiple clients connect, and then one sends data, and that data gets send to another specific client. Which client it gets sent to is determined by a 'user id' that all clients will send after they connect.
How can I keep track of clients as they connect? How can I find my specif...
I've seen a slide that presented Fab, a node.js framework.
Is this JavaScript?
Could someone explain what is going on in that code?
I'm all lost.
...
I want to detect changes for a file, if the file changes, I will use child_process to execute a scp command to copy the file to a server.I looked up node.js documentation, the fs.watchFile function seems do what I want to do, but when I tried it, somehow it just doesn't work as I expected. The following code were used:
var fs = require(...
code:
var nerve = require("./nerve");
var sitemap = [
["/", function(req, res) {
res.respond("Русский");
}]
];
nerve.create(sitemap).listen(8100);
show in browser:
CAA:89
How it should be correct?
...
I'm writing a game server in node.js, and some operations involve heavy computation on part of the server. I don't want to stop accepting connections while I run those computations -- how can I run them in the background when node.js doesn't support threads?
...
I've recently "discovered" Node.js, and after I was finished having my mind blown, I started looking for a web application framework like Django or Codeigniter that uses Node.js. The main reasons I found online for using a Node.js-based framework were:
Impressive scalability and speed, especially regarding simultaneous connections
Same...
Is there a way to overload functions in node.js similar to _noSuchMethod_ https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/noSuchMethod?
Thanks
...
I am learning node.js and most of examples I can find are dealing with simple examples. I am more interested in building real-world complicated systems and estimating how well event based model of node.js can handle all the use cases of a real application.
One of the common patterns that I want to apply is let blocking execution to time...