node.js

How to restart a node.js server

I've installed and is running a node.js server on osx. I've dled a chat module and is happily running it. I've altered some pieces and need to restart the server to see the effects. I only know how to restart by closing the terminal window and then reopneing it and then running node chatdemo.js again. Any way to restart without closing...

node.js sending css files

I'm trying to get a node.js server to send css files. I'm modifying this server here: http://github.com/LearnBoost/Socket.IO-node/blob/master/test/server.js What's wrong with what I'm doing: server = http.createServer(function(req, res){ // your normal server code var path = url.parse(req.url).pathname; switch (path){ ...

packing binary string in NodeJS under 32 bit produces incorrect results

I am using the following "pack" function provided by the excellent php.js project. http://github.com/kvz/phpjs/blob/master/functions/misc/pack.js Running this in Mozilla's JavaScript shell it works fine, but running it in Node produces incorrect strings. example, packing the number 2 as a Double with: pack('d',2); JS Shell produces: ...

A board game in javascript, both server and client side

Hi all, I will probably use javascript to develop an online board/card game. My approach will be to have a client that will be able to work in standalone mode, so it must enforce rules. That means for example, if a player can't play a card, he or she shouldn't even be able to play it. This is to enhance the user experience. The idea he...

Node.js could not configure a cxx compiler!

I have ubuntu installed and I am trying to compile node.js ...

How would an irc bot written in tcl stack up against a python/node.js clone?

I believe eggdrop is the most active/popular bot and it's written in tcl ( and according to wiki the core is C but I haven't confirmed that ). I'm wondering if there would be any performance benefit of recoding it's functionality in node.js or Python, in addition to making it more accessible since Python and JS are arguably more popular...

Nodejs streaming

Hello. I want to realize a simple client-server connection using Nodejs. But I've encountered with the following problem. Consider the code server.js: var net = require('net'), sys = require('sys'); net.createServer(onConnection).listen(8124); function onConnection(socket) { socket.setNoDelay(true); socket.ad...

Do I have to reload app.js every time I make a small change?

When I start up my application in node.js node app.js and then make a change in app.js file, I have to exit node.js and restart it in order for this change to show up in my browser. Is node.js caching the file at startup? Is there a way to avoid this, at least in development mode? ...

What exactly is a node in node.js?

In Erlang I was able to immediately understand the notion of a 'node' - a self-contained Erlang VM. I could start a node on one machine with erl -name gandalf -setcookie abc, and another node on another machine (on the same LAN) with erl -name bilbo -setcookie abc. I could then spawn processes on gandalf which would communicate magically...

Private messaging through node.js

Hi! I'm making a multiplayer (2 player) browser game in JavaScript. Every move a player makes will be sent to a server and validated before being transmitted to the opponent. Since WebSockets isn't ready for prime time yet, I'm looking at long polling as a method of transmitting the data and node.js looks quite interesting! I've gone th...

Problem with prototypal inheritance and instance array

I use prototypal inheritance and want to have objects with instance arrays. So if I derive some objects from one object with an instance array and access the array, all of them share the array. I want to push something to the array and only change the array in the actual object, not in all others. What is a elegent solution to this Prob...

Javascript GTK bindings

THe Bindings for the GTK library in Javascript maintained by Gnome, are they asynchronous or synchronous calls? I have not been able to find details one way or the other. I would like to develop a NodeJS module for GTK for desktop app creation. ...

Node.js Performance

Hi All, Is Node.js quicker and more scalable than Apache? Are there any performance figures to back up Node.js's performance for a web application over Apache? UPDATE: Ok maybe my question (above) is confusing because I am a little confused as to how Node.js sits within a web stack. Under what circumstances should I consider using Node...

Compiling node.js on Cygwin

Hi. I'm trying to build node.js on my Windows XP box (Yes, it IS painful, thanks.) using Cygwin following Ryans instructions here. Sadly calling "./configure" from the node source directory barfs up this: $ ./configure /home/LWE/sources/node.js/wscript: error: Traceback (most recent call last): File "/home/LWE/sources/node.js/tools/w...

WebSocket closes on send

So I saw this great blog post, Experimenting with Node.js. I decided to try and set it up on my own using the author's gist. It didn't work. Further debugging shows me that the the websocket is connecting fine, but is closing as soon as 'send' is invoked. Here is the wireshark trace(forgive the weird spacing): GET /test HTTP/1.1 Host:...

Implementation of a web-server

I had like to implement my own web-server in pure Java the web-server should support only static resources (i.e. html, js, css, pics, movies etc..) Can you recommend a tutorial or an article on how to implement such a thing? should I use few processes or a thread-pool or should I consider a loop-event oriented like NodeJS? I know there...

mootools & nodejs

can i use mootools on the serverside with nodejs? If so, can someone give an example? ...

Serialization of Javascript from Server(NodeJS) to Browser

I would like to serialize an instance of JS object from the Server-side to the Client side (the object contains data members and functions) I have a Javascript stack on both end, all my users use Chrome and My server side is a NodeJS impl.. how would I do it? It should be trivial as my server is a Javascript one.. ...

nodejs without stopping

is there a way i can make nodejs reload everytime it serves a page? ...

Nodejs & websockets

Hi, I'm trying to push data from my browser (Chrome) to a nodejs server and I'm having terrible trouble. Basically, I've got this code that appears in the browser: <script src="./Socket.IO/socket.io.js"></script> <script> io.setPath('./Socket.IO/'); var socket=new io.Socket('xxx.xxx.xxx.xxx'); socket.on('conn...