Re: [nodejs] Re: Need advice, STDOUT and STDERR of child_process asynchronously rander to index page

2013-02-11 Thread asynqronic
On Monday, February 11, 2013 8:40:31 AM UTC+7, Suraj Singh Thapa wrote: Thanks Martin, Returning function resolved the issue, module.exports = function() { var spawn = require('child_process').spawn, ls= spawn('ls', ['-lh', '/usr']); ls.stdout.on('data', function (data) {

[nodejs] nodejs module.js:340 throw err; using WebSocket-Node

2013-02-11 Thread umen
im new to this , i installed the nodejs with the installer in windows. then i installed the WebSocket-Node https://github.com/Worlize/WebSocket-Nodemodule with this command: npm install websocket , looks like successful install . npm http GET https://registry.npmjs.org/websocket npm

[nodejs] global authorization

2013-02-11 Thread Mustafa Özyurt
Hey, Im using this code to prevent cross-domain access to my server.js. But even-tho server.js and wp.html files at the same host its not working. Here is the given warning... info - socket.io started debug - served static content /socket.io.js debug - authorized warn - handshake error

[nodejs] which is the best way to run tests?

2013-02-11 Thread Jorge Ferrando
hi, everybody. How do you run your tests in your projects? We want to run separately unit tests, integration tests and acceptance (service) tests. By now we are using npm test to run all together and make test-unit, make test-integration, make test-acceptance to run it separatly. We wonder

Re: [nodejs] Is it possible to use node.js to built very simple cross-platform app?

2013-02-11 Thread Simon
I've written a Dropbox-like tool in node.. @Matt I'd be interested in that, as I have to write a similar command-line tool for OS X. I was going to use watchr https://github.com/bevry/watchrwhich I've had success with in the past, but I will have to write the logic to mirror changes to a

[nodejs] Re: global authorization

2013-02-11 Thread Bodo Kaiser
This is a module specific question: you should search in the socket.io docs how to enable cross domain connections. Background of such mechanism: http://en.wikipedia.org/wiki/Same_origin_policy Am Montag, 11. Februar 2013 13:48:29 UTC+1 schrieb Mustafa Özyurt: Hey, Im using this code to

[nodejs] Re: which is the best way to run tests?

2013-02-11 Thread Bodo Kaiser
Hey, as you are talking about make and npm I assume your projects are written in c or c++. In this case I cannot help you but if you mean javascript modules than I can say that there a lot of tools which allow you to structure your test (such as mocha, http://visionmedia.github.com/mocha/ ).

Re: [nodejs] which is the best way to run tests?

2013-02-11 Thread Daniel Rinehart
The current approach we use is to use the npm scripts block to define our own custom targets along with using the standardized pretest, test, and posttest hooks. Since our integration tests require external resources such as a database to be up and running we don't run those as part of npm test

[nodejs] Re: nodejs module.js:340 throw err; using WebSocket-Node

2013-02-11 Thread Bodo Kaiser
Your link to the example does not work but I could believe that you have to change the module paths when copying the example: In the project repo of the lib: var websocket = require('../lib/index'); but when installed with npm var websocket = require('websocket'); On Monday, February 11, 2013

Re: [nodejs] Is it possible to use node.js to built very simple cross-platform app?

2013-02-11 Thread Matt
On Mon, Feb 11, 2013 at 8:24 AM, Simon simon.stur...@gmail.com wrote: I've written a Dropbox-like tool in node.. @Matt I'd be interested in that, as I have to write a similar command-line tool for OS X. I was going to use watchr https://github.com/bevry/watchrwhich I've had success with in

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Tim Caswell
The language itself has no I/O at all. Even setTimeout and setInterval are implemented by the libuv bindings using uv_timer_t instances. In the browser the language VM is bound to the browser natives and APIs. In node, the language is bound to libuv and other natives that node exposes. As far

[nodejs] Re: nodejs module.js:340 throw err; using WebSocket-Node

2013-02-11 Thread greelgorke
i asume that D:\dev\html5\books\bumper\ is your project root. the stacktrace says that the string in your require-call is /path/to/websocket. change it to 'websocket' and it should do. also the module is installed in the project root did not in the nodejs dir , is it ok? this is how it should

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Tim Caswell
I'm a C++ newb myself, so I can't recommend any good resources. I learned most my libuv through porting node to lua (luvit.io), but that was all plain C code (which I consider much easier than C++). On Mon, Feb 11, 2013 at 10:05 AM, Bodo Kaiser bodo.kai...@enabre.comwrote: Hello, thank you

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Bodo Kaiser
I would also be happy with some C Tutorial :) PS: To luvit: Interesting that it is possible to use the Node basement with different languages and also that this is faster than JavaScript (because of the native c bindings?). I will follow the project and look how it will develope. Regards,

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Tim Caswell
I learned my C from various C man pages on google searches and asking around on irc channels. Regarding performance between luvit and node.js, it's not objectivly one is faster than the other. It is true that luajit and v8 are both very fast JIT VMs with their own unique strengths. The biggest

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Nikhil Marathe
On Mon, Feb 11, 2013 at 9:28 AM, Bodo Kaiser bodo.kai...@enabre.com wrote: I would also be happy with some C Tutorial :) Kernighan and Ritchie's C book is your best bet :) It's very short and succinct and well written. Nikhil -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Bodo Kaiser
I will keep the man pages and the channels on mind thank you! I took the performance these from luvit.io where it says two to four times faster than node on hello world server. However I think performance is a very small issue on both platforms. I am interesting how both will develop. There is

Re: [nodejs] does libuv's event loop handle all callbacks?

2013-02-11 Thread Bodo Kaiser
Thank you for the hint. Will keep a look at it. Regards, Bodo Am 11.02.2013 um 18:42 schrieb Nikhil Marathe nsm.nik...@gmail.com: On Mon, Feb 11, 2013 at 9:28 AM, Bodo Kaiser bodo.kai...@enabre.com wrote: I would also be happy with some C Tutorial :) Kernighan and Ritchie's C book is

[nodejs] [ANN] StrongLoop STAC

2013-02-11 Thread Al Tsang
Hey guys, This is Al, one of Bert Ben's colleagues at StrongLoop. One thing we want to do is to invest a bit in Node and the tools/libraries around it to make life better for everyone. We're starting a program called STAC so we can get feedback more intimate than this mailing list on what

[nodejs] Re: [ANN] windows-eventlog 1.0.0

2013-02-11 Thread Benjamin Eidelman
Thanks Jose, this is really useful! I got surprised by the Esta bueno, pero... though, I think node.js on windows is a first-class citizen, and not just for multi-platform, and the eventlog is an excellent transport choice. Regards, On Thursday, January 31, 2013 12:11:51 PM UTC-3, José F.

Re: [nodejs] Re: [ANN] windows-eventlog 1.0.0

2013-02-11 Thread José F . Romaniello
thanks! I think what I meant there is that if you are not already using winston use just the logger https://github.com/jfromaniello/windowseventlogjs I really like winston, though 2013/2/11 Benjamin Eidelman benja1...@gmail.com Thanks Jose, this is really useful! I got surprised by the

Re: [nodejs] which is the best way to run tests?

2013-02-11 Thread Ryan Schmidt
On Feb 11, 2013, at 08:28, Bodo Kaiser wrote: as you are talking about make and npm I assume your projects are written in c or c++. No need to assume that. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines

Re: [nodejs] Need advice, STDOUT and STDERR of child_process asynchronously rander to index page

2013-02-11 Thread Ryan Schmidt
On Feb 10, 2013, at 19:40, Suraj Singh Thapa wrote: As my requirement is, -- When a user click refresh button I want this function to execute and get the data and load it on index page. -- But I do not want, process to send the whole page back to server. So that user don't have

Re: [nodejs] Need advice, STDOUT and STDERR of child_process asynchronously rander to index page

2013-02-11 Thread s thapa
I am thinking of creating a refresh button because auto reload of webpage might froze webpage until data is extracted from server to client and this my annoy users. Any suggestion or sample code are welcome. On Tuesday, February 12, 2013 9:14:07 AM UTC+11, ryandesign wrote: On Feb 10,

[nodejs] Re: [ANN] StrongLoop STAC

2013-02-11 Thread Al Tsang
You can drop me a line by sending to my StrongLoop email - a...@strongloop.com. Thanks and look forward to hearing from you guys! -a- On Monday, February 11, 2013 9:36:31 AM UTC-8, Al Tsang wrote: Hey guys, This is Al, one of Bert Ben's colleagues at StrongLoop. One thing we want to do

Re: [nodejs] Need advice, STDOUT and STDERR of child_process asynchronously rander to index page

2013-02-11 Thread asynqronic
On Tuesday, February 12, 2013 5:21:17 AM UTC+7, s thapa wrote: I am thinking of creating a refresh button because auto reload of webpage might froze webpage until data is extracted from server to client and this my annoy users. Any suggestion or sample code are welcome. In

[nodejs] Re: which is the best way to run tests?

2013-02-11 Thread Alexey Petrushin
I create my-project/scripts/script-name , so You can use scripts/run scripts/test, ... On Monday, February 11, 2013 4:14:56 PM UTC+4, Jorge Ferrando wrote: hi, everybody. How do you run your tests in your projects? We want to run separately unit tests, integration tests and acceptance

[nodejs] Re: which is the best way to run tests?

2013-02-11 Thread Alexey Petrushin
As for different tests - it's possible to put unit/integration/acceptance in different folder and use mocha + zombie.js On Tuesday, February 12, 2013 4:59:14 AM UTC+4, Alexey Petrushin wrote: I create my-project/scripts/script-name , so You can use scripts/run scripts/test, ... On Monday,

Re: [nodejs] Need advice, STDOUT and STDERR of child_process asynchronously rander to index page

2013-02-11 Thread s thapa
Thanks asynqronic, Following code, *profiles3.js* module.exports = function(callback){ var spawn = require('child_process').spawn, ls = spawn('ls', ['-lh', '/usr']); ls.stdout.on('data', callback); ls.stderr.on('data', callback); ls.on('exit', callback); }; *index.js*

Re: [nodejs] Need advice, STDOUT and STDERR of child_process asynchronously rander to index page

2013-02-11 Thread asynqronic
On Tuesday, February 12, 2013 9:06:22 AM UTC+7, s thapa wrote: Thanks asynqronic, Following code, *profiles3.js* module.exports = function(callback){ var spawn = require('child_process').spawn, ls = spawn('ls', ['-lh', '/usr']); ls.stdout.on('data', callback);

[nodejs] Re: EADDRINUSE when connecting to Memcached service from node.js

2013-02-11 Thread greelgorke
you're on the wrong path. use net.connect to create a client-connection (you know, your code is client-code for memcached). what you are doing with createServer is to create a server, which just listen on the given port and handles connections Am Dienstag, 12. Februar 2013 05:54:43 UTC+1