[nodejs] How to finish request and flush all data while continuing to do something time-consuming in Express route?

2013-02-21 Thread benpptung
Great Node.js!! I do love it. Not sure if I can post question here. Apologized if I am wrong. I am wondering how can I finish the request and do something time consuming, e.g. email/file conversion...etc. I've tried the following four ways, but all of them take long time to return the response

[nodejs] Is there a lib to parse IRI(rfc3987)?

2013-02-21 Thread 张旭
Hi, I am looking up a library implemented by javascript to validate an identifier match IRI requirements. But I haven't got a good one for this purpose. Anyone knows that? Thanks -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

[nodejs] Re: Any way to wrap http.serverResponse?

2013-02-21 Thread deitch
So I did something like this (pseudocode), works pretty well. I am currently using it to transparently cache requests. This would be *so* much easier if google groups supported markdown like github. // config includes what to call next in the chain, ttl for my cache, and a secret key to flush

[nodejs] Re: Any way to wrap http.serverResponse?

2013-02-21 Thread greelgorke
you can use gists and link to them. i remember, that underscore has a wrap function, you could use it or copy it's implementation. Am Donnerstag, 21. Februar 2013 09:37:53 UTC+1 schrieb deitch: So I did something like this (pseudocode), works pretty well. I am currently using it to

[nodejs] Re: Any way to wrap http.serverResponse?

2013-02-21 Thread deitch
Yeah, I could, but for short chunks of code, inline with markdown code-formatting is hugely easier. I had forgotten about wrap. Moot point now, I guess. On Thursday, February 21, 2013 10:53:11 AM UTC+2, greelgorke wrote: you can use gists and link to them. i remember, that underscore has a

[nodejs] [ANN]: Lookup CPU and Memory usage inside NodeJS with node-usage

2013-02-21 Thread Arunoda Susiripala
Hi, We can look for System CPU and Memory usage with node's os module. But we can't lookup current running node process's usage inside the app. So, with `node-usage https://github.com/arunoda/node-usage` you can do it. And also usage lookup for any other accessible process(using pid) is also

[nodejs] webAPI and How to harvest Data independent of a browser?

2013-02-21 Thread Jonathan Chetwynd
Collecting data in a separate process is 'out of scope', as discussing webAPI. Seeking comments and feedback: Data collected often needs to be processed before serving or displaying. Recent webAPI developments such as navigator.getUserMedia allow data beyond mouse clicks and keyboard input to

[nodejs] Re: : Lookup CPU and Memory usage inside NodeJS with node-usage

2013-02-21 Thread mscdex
On Feb 21, 5:01 am, Arunoda Susiripala arunoda.susirip...@gmail.com wrote: But we can't lookup current running node process's usage inside the app. That's not entirely true for memory: http://nodejs.org/docs/latest/api/process.html#process_process_memoryusage -- -- Job Board:

[nodejs] Re: [ANN]: Lookup CPU and Memory usage inside NodeJS with node-usage

2013-02-21 Thread Arunoda Susiripala
Awesome. I was not aware of this. Does this includes all the memory used including child process? On Thursday, February 21, 2013, mscdex wrote: On Feb 21, 5:01 am, Arunoda Susiripala arunoda.susirip...@gmail.comjavascript:; wrote: But we can't lookup current running node process's usage

[nodejs] Does NodeJs support https?

2013-02-21 Thread Burak Gürbüz
When i try to run the chat system which i wrote, socket.js works on http but doesn't work on https. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the

[nodejs] Re: Does NodeJs support https?

2013-02-21 Thread mscdex
On Feb 21, 9:54 am, Burak Gürbüz bur...@gmail.com wrote: When i try to run the chat system which i wrote, socket.js works on http but doesn't work on https. http://nodejs.org/docs/latest/api/https.html -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

[nodejs] Re: : Lookup CPU and Memory usage inside NodeJS with node-usage

2013-02-21 Thread mscdex
On Feb 21, 7:29 am, Arunoda Susiripala arunoda.susirip...@gmail.com wrote: Awesome. I was not aware of this. Does this includes all the memory used including child process? It's on the process object, so it's the current process only. -- -- Job Board: http://jobs.nodejs.org/ Posting

Re: [nodejs] Re: : Lookup CPU and Memory usage inside NodeJS with node-usage

2013-02-21 Thread Arunoda Susiripala
Cool. Got it. On Thu, Feb 21, 2013 at 8:36 PM, mscdex msc...@gmail.com wrote: On Feb 21, 7:29 am, Arunoda Susiripala arunoda.susirip...@gmail.com wrote: Awesome. I was not aware of this. Does this includes all the memory used including child process? It's on the process object, so it's

Re: [nodejs] Is there a lib to parse IRI(rfc3987)?

2013-02-21 Thread Isaac Schlueter
The node url parser can handle internationalized domain names. It uses a punycode parser written by Mathias Bynens that is bundled with node as `require('punycode')`. On Wed, Feb 20, 2013 at 9:56 PM, 张旭 zhang@gmail.com wrote: Hi, I am looking up a library implemented by javascript to

Re: [nodejs] Does NodeJs support https?

2013-02-21 Thread Ben Noordhuis
On Thu, Feb 21, 2013 at 3:54 PM, Burak Gürbüz bur...@gmail.com wrote: When i try to run the chat system which i wrote, socket.js works on http but doesn't work on https. With all due respect but please read http://www.catb.org/esr/faqs/smart-questions.html first. -- -- Job Board:

[nodejs] module.exports and property descriptors

2013-02-21 Thread Bernardo
I came across this code (in a Joyent repository) and was wondering if someone can explain the purpose or benefit of declaring exports this way. Thank you. module.exports = { get Amon() { return require('./amon'); }, get CA() { return require('./ca'); }, get

[nodejs] Re: module.exports and property descriptors

2013-02-21 Thread Bradley Meck
Loading in modules can be time consuming for one off apps or resource constrained apps. This only requires them when they are being requested. For long running apps that can consume time and resources at startup this is generally not needed / wanted. -- -- Job Board: http://jobs.nodejs.org/

[nodejs] Re: module.exports and property descriptors

2013-02-21 Thread Bernardo
I see. This is code for a command tool, it makes sense. Thank you. On Thursday, February 21, 2013 1:28:39 PM UTC-3, Bradley Meck wrote: Loading in modules can be time consuming for one off apps or resource constrained apps. This only requires them when they are being requested. For long

Re: [nodejs] How to finish request and flush all data while continuing to do something time-consuming in Express route?

2013-02-21 Thread Mark Hahn
Use res.end() to finish the connection. If you are just sending the return data once, use res.end(data). On Wed, Feb 20, 2013 at 10:08 PM, benppt...@tacol.biz wrote: Great Node.js!! I do love it. Not sure if I can post question here. Apologized if I am wrong. I am wondering how can I

Re: [nodejs] How to do 301 Redirects

2013-02-21 Thread Eric Mill
For anyone who tries to do this, it was just a few lines: https://gist.github.com/konklone/5006662 On Monday, April 25, 2011 10:09:33 AM UTC-4, Francois Laberge wrote: Thanks. It communicates over wifi so typically it takes about 1/150th of a second to communicate. Francois On Mon, Apr

[nodejs] Re: How to finish request and flush all data while continuing to do something time-consuming in Express route?

2013-02-21 Thread Geerten van Meel
The moment you use red.end() or res.render() data is being sent to the client and the connection is closed afterwards. Whatever you do after that point does not increase the time the request takes for the client*. Thus all of your suggestions are fine and don't really make any difference. *:

[nodejs] Re: module.exports and property descriptors

2013-02-21 Thread Chris Ackerman
Why would this be better than just requiring one of those modules when you want it? On Thursday, February 21, 2013 8:28:39 AM UTC-8, Bradley Meck wrote: Loading in modules can be time consuming for one off apps or resource constrained apps. This only requires them when they are being

Re: [nodejs] Re: Does NodeJs support https?

2013-02-21 Thread Harald Hanche-Olsen
[Burak Gürbüz bur...@gmail.com (2013-02-21 17:09:28 UTC)] Simply, the screenshot which error i get is below. I don't get this error on http. https://lh5.googleusercontent.com/-UcaYO0sCayg/USZJTPquIvI/AA4/dmTLZGlhu-I/s1600/err.png Take a look at

Re: [nodejs] Re: Does NodeJs support https?

2013-02-21 Thread Gustavo Machado
Make sure you use the secure option on the client side: ar socket = io.connect('https://localhost', {secure: true}); Gustavo Machado machad...@gmail.com On Feb 21, 2013, at 3:47 PM, Harald Hanche-Olsen han...@math.ntnu.no wrote: [Burak Gürbüz bur...@gmail.com (2013-02-21 17:09:28 UTC)]

[nodejs] I am trying to use the Node SSL and make a https call working

2013-02-21 Thread Pavi
Hi i am trying to make a https call from nodejs and do an ssl validation at the node. But i always get this error, error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:683 You is my really small https call function, var getProfile2 =

Re: [nodejs] Error: write EPIPE

2013-02-21 Thread Ben Noordhuis
On Thu, Feb 21, 2013 at 6:17 PM, Gustavo Machado machad...@gmail.com wrote: Hi, In turned out to be the process.stdout. Apart from reducing the console.logs to a minimum, we are planning to use epipebomb to avoid the process to crash under heavy load. Is there any way to re-open the

Re: [nodejs] net-snmp - full SNMP version 1 and 2c support for Node.js

2013-02-21 Thread Stephen Vickers
No, it is a pure JavaScript implementation. On Monday, 18 February 2013 00:14:20 UTC, James Gosnell wrote: Is this affiliated with the Net-SNMP Project? On Sat, Feb 16, 2013 at 2:43 PM, Stephen Vickers vortex...@gmail.comjavascript: wrote: Hi All, I've created the new module net-snmp

[nodejs] Re: Native Windows services in Node.js

2013-02-21 Thread Stephen Vickers
First version is posted on npm: https://npmjs.org/package/windows-service On Saturday, 16 February 2013 09:26:24 UTC, Stephen Vickers wrote: Hi All, I am considering an attempt to implement native Windows service support for Node.js. For myself it's purely a learning excercise, and at

[nodejs] windows-service - Run Node.JS programs as native Windows Services.

2013-02-21 Thread Stephen Vickers
Hi All, I've created a new module named windows-service providing the ability to run Node.JS programs as native Windows Services. The new module can be installed using npm: https://npmjs.org/package/windows-service Steve -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

[nodejs] compilation error for node-v0.8.19 on Solaris SPARC 10

2013-02-21 Thread ishimegh
Hi, I am trying to compile mentioned node version on Solaris SPARC 10 but got the error. I have installed python 2.7.3. When I ran configure, I got below error - bash-3.00# ./configure Traceback (most recent call last): File ./configure, line 472, in module configure_node(output) File

Re: [nodejs] compilation error for node-v0.8.19 on Solaris SPARC 10

2013-02-21 Thread Ben Noordhuis
On Fri, Feb 22, 2013 at 12:13 AM, ishim...@gmail.com wrote: Hi, I am trying to compile mentioned node version on Solaris SPARC 10 but got the error. I have installed python 2.7.3. When I ran configure, I got below error - bash-3.00# ./configure Traceback (most recent call last): File

Re: [nodejs] compilation error for node-v0.8.19 on Solaris SPARC 10

2013-02-21 Thread ishimegh
Thanks Ben for your reply. It will be helpful to consider other alternative. On Thursday, February 21, 2013 6:27:00 PM UTC-5, Ben Noordhuis wrote: On Fri, Feb 22, 2013 at 12:13 AM, ishi...@gmail.com javascript: wrote: Hi, I am trying to compile mentioned node version on Solaris

[nodejs] SAP is interesting in node.js

2013-02-21 Thread Jordan
Hi, I heard that SAP is interesting in node.js and looking for experts to build the database driver. Anyone has interest to do it? Please contact me by email. Thanks! -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] windows-service - Run Node.JS programs as native Windows Services.

2013-02-21 Thread Jeremy Darling
What is the difference in this and WinSer using NSSM? I'm not picking I'm just curious. On Thu, Feb 21, 2013 at 4:41 PM, Stephen Vickers vortex.is...@gmail.comwrote: Hi All, I've created a new module named windows-service providing the ability to run Node.JS programs as native Windows

[nodejs] I finished some important JS Specifications, welcome to discuss...

2013-02-21 Thread fengchun . china
visit URL is: https://github.com/fch415/jss *#1 Javascript Class Specification*Summary This specification solves JS Class and Package definitions and auto loading. Allows loading general js or css file of JS Class's dependent resources. Because of each class namespace under its own class