[nodejs] how to read json array

2014-01-16 Thread Jyoti Chhetri
API rest is sending following json, I'm not being able to read it, I need 
to match ID as seen below say 95 for which array of city needs to be shown. 
Please help me do it.

'95': 
   [ { cityId: 78, cityName: 'Kuala Kangsar' },
 { cityId: 94, cityName: 'Tanjung Malim' },
 { cityId: 1, cityName: 'Singapore' },
 { cityId: 9, cityName: 'Ipoh' },
 { cityId: 83, cityName: 'Taiping' } ],
  '103': 
   [ { cityId: 11, cityName: 'Baling' },
 { cityId: 10, cityName: 'Alor Setar' },
 { cityId: 52, cityName: 'Jitra' },
 { cityId: 31, cityName: 'Butterworth' },
 { cityId: 12, cityName: 'Changlun' },
 { cityId: 33, cityName: 'Penang' } ] }

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Re: NodeJS PPTP VPN server

2014-01-16 Thread Simon
Never ceases to impress me the variety of networking tools and protocols 
people have implemented in Node. Thanks for releasing this, I'm sure 
there's a use for it out there (PPTP - OpenVPN bridge comes to mind, for 
users that can't install an OpenVPN client)

On Thursday, January 16, 2014 5:06:41 PM UTC-8, Marcel wrote:
>
> I wrote an experimental PPTP VPN server in Node. Why? We may never know. 
> Anyway this was part of a larger personal project and I ultimately decided 
> to swap this component out for a solution involving routing tables and 
> tun/tap instead. Figured there was a small chance someone would get some 
> use from it so here it is.
>
> https://github.com/laverdet/node-pptp
>
> Enjoy.
>

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Re: NodeJS PPTP VPN server

2014-01-16 Thread Tom Boutell
Wow, I don't need that, but it's pretty cool (:

On Thursday, January 16, 2014 8:06:41 PM UTC-5, Marcel wrote:
>
> I wrote an experimental PPTP VPN server in Node. Why? We may never know. 
> Anyway this was part of a larger personal project and I ultimately decided 
> to swap this component out for a solution involving routing tables and 
> tun/tap instead. Figured there was a small chance someone would get some 
> use from it so here it is.
>
> https://github.com/laverdet/node-pptp
>
> Enjoy.
>

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] NodeJS PPTP VPN server

2014-01-16 Thread Marcel Laverdet
I wrote an experimental PPTP VPN server in Node. Why? We may never know.
Anyway this was part of a larger personal project and I ultimately decided
to swap this component out for a solution involving routing tables and
tun/tap instead. Figured there was a small chance someone would get some
use from it so here it is.

https://github.com/laverdet/node-pptp

Enjoy.

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Why is my value suddenly a STRING O.o?

2014-01-16 Thread Kevin Ingwersen
hey!

I…am stuck, again. This time however, I can’t find anything but posting here.

So, I have extended on my ph7 project now, and it has come to a point where it 
is almost usable. But now I ran into an issue that is confusing me. So, within 
my ObjectWrap class (ph7_wrapper : node::ObjectWrap) I have this declaration:

v8::Local include_path;
v8::Local $_SERVER;
v8::Local $SGLOBALS;
v8::Local $_ENV;
v8::Local $_HEADERS;
v8::Local $_GET;
v8::Local $_POST;
v8::Local $_COOKIE;
v8::Local $_SESSION;
v8::Local $argv;
v8::Local $GLOBALS;

Its quite some, but I am not showing off everything, just the most important.
Now, I have a create method that returns a new instance with these variables. 
The actual logic is this:

Handle ph7_wrapper::create(const Arguments& args) {
HandleScope scope;

// Create template
Local tpl = ObjectTemplate::New();
tpl->SetInternalFieldCount(2);

// Let's not forget the accessors.
tpl->SetAccessor(String::New("$SGLOBALS"),   
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("$_SERVER"),
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("$_ENV"),   
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("$_GET"),   
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("$_POST"),  
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("$_COOKIE"),
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("$_SESSION"),   
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("$_HEADERS"),   
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("$GLOBALS"),
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("$argv"),   
ph7_wrapper::vm_getter, ph7_wrapper::vm_setter);
tpl->SetAccessor(String::New("include_path"),ph7_wrapper::vm_getter, 
ph7_wrapper::vm_setter);

// Now, lets assign methods!
NODE_SET_METHOD(tpl, "config",  ph7_wrapper::vm_config);
NODE_SET_METHOD(tpl, "prepair", 
ph7_wrapper::vm_prepair);
NODE_SET_METHOD(tpl, "compile", 
ph7_wrapper::vm_compile);
NODE_SET_METHOD(tpl, "compileFile", ph7_wrapper::vm_compileFile);

// Now the uber convinience :3
tpl->SetCallAsFunctionHandler(ph7_wrapper::vm_run);

// Wrap the nativeness.
Local obj = tpl->NewInstance();
ph7_wrapper *$self = new ph7_wrapper;
// Cast to void, store in object.
obj->SetPointerInInternalField(0, (void*)$self);

return scope.Close(obj);
}

So far so good. I can create my object, but when I use console.log to read if 
everything is there, I run straight into a crash. Why? Well, the problem lies 
in my getter function:

Handle ph7_wrapper::vm_getter(Local property, const 
AccessorInfo& info) {
NJS_UNWRAP_ACC($self, ph7_wrapper, info, 0);
HandleScope scope;

const char* cprop = **(new String::AsciiValue(property));
cout << "Getting: " << cprop << endl;

 if (strcmp(cprop, "include_path") == 0) { return 
scope.Close($self->include_path); }
else if (strcmp(cprop, "$_SERVER") == 0) { return 
scope.Close($self->$_SERVER); }
else if (strcmp(cprop, "$_ENV") == 0) { return 
scope.Close($self->$_ENV); }
else if (strcmp(cprop, "$_HEADERS") == 0) { return 
scope.Close($self->$_HEADERS); }
else if (strcmp(cprop, "$_GET") == 0) { return 
scope.Close($self->$_GET); }
else if (strcmp(cprop, "$_POST") == 0) { return 
scope.Close($self->$_POST); }
else if (strcmp(cprop, "$_COOKIE") == 0) { return 
scope.Close($self->$_COOKIE); }
else if (strcmp(cprop, "$_SESSION") == 0) { return 
scope.Close($self->$_SESSION); }
else if (strcmp(cprop, "$argv") == 0) { return 
scope.Close($self->$argv); }
else if (strcmp(cprop, "$GLOBALS") == 0) { return 
scope.Close($self->$GLOBALS); }
else if (strcmp(cprop, "$SGLOBALS") == 0) { return 
scope.Close($self->$SGLOBALS); }
elsereturn scope.Close(Undefined());
}


The crash reports that „an invaild object was returned“, and due to my little 
cout above the if’s, I know the variable, and that it happens right here, once 
osmething is returned. When I just look up one variable, which does not crash, 
and let nodejs display the type to me…it tells me that it is a string. Why, on 
god’s earth, is something that was totally initialized as

this->$_SERVER  = Array::New();

suddenly a frigin string?… I really ran out of ideas.

If anyone would be able to tell me, wha

Re: [nodejs] State of the art for request isolation in http servers?

2014-01-16 Thread Mikeal Rogers
The core team built domains specifically to tackle this problem.

http://nodejs.org/api/domain.html

Forrest and Domenic did a session about them at NodeConf last year, their 
materials are here: 

https://github.com/mikeal/nodeconf2013/tree/master/pkg/domains

If you analyze the code you're working on you *can* create domains around 
specific areas of code that you're confident won't leak on exception but it's 
still a better idea to schedule the process to be cycled.

-Mikeal

On Jan 14, 2014, at 12:28PM, Gregg Caines  wrote:

> Hey all... I'm wondering if anyone can point me to the current best-practice 
> for isolating requests in a web app.  In general I'm trying to solve the 
> problem of keeping the server running despite bad code in a particular 
> request.  Are domains my only shot?  Do they completely solve it?  Does 
> anyone have existing code?
> 
> I'm on a somewhat large team, working on a somewhat large codebase, and until 
> now I've been just logging restarts and combing logs for these types of 
> errors, then fixing them (which I'll always do), but I'm starting to feel a 
> bit silly with PHP having solved this 10 years ago.  ;)  When a bug does get 
> through, it would be nice to not lose the whole server and the possible 
> 10,000+ customer requests attached to it, while I scramble to fix it.
> 
> Thanks for any ideas or pointers!
> 
> G
> 
> -- 
> -- 
> 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 Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Re: State of the art for request isolation in http servers?

2014-01-16 Thread Bruno Jouhier
Hi Alain,

We use streamline.js. We have developed a big application with it (> 100 k 
lines of streamline souce code). For an example of what a streamline app 
looks like (with exception handling), see 
https://github.com/Sage/streamlinejs/blob/master/tutorial/tutorial.md

Bruno

On Thursday, January 16, 2014 4:57:26 PM UTC+1, Alain Mouette wrote:
>
>  Could you share how you did that?
> I intend to test that kind of thing *before* building a real application, 
> I am new to node (I came from C++) and it may be an interesting learning 
> path (even if a bit difficult)
>
> Thanks
>
> Alain
> === Minha MesaXYZ:  
>  ===
>
> Em 16-01-2014 06:48, Bruno Jouhier escreveu:
>  
> No water-tight technical solution? There are some. Problem is that people 
> are reluctant to go with them. 
>
> For me, the exception handling problem has been solved 3 years ago. Our 
> server is robust. If someone messes up in some kind of obscure piece of 
> code that nobody tested, nothing dramatic will happen. The client of the 
> service will get a 500, the full stacktrace will be logged (with both long 
> and row stacktraces) and the server will go on with the other requests.
>
> Bruno 
>
> On Thursday, January 16, 2014 7:02:17 AM UTC+1, Tomasz Janczuk wrote: 
>>
>>  In general I'm trying to solve the problem of keeping the server 
>>> running despite bad code in a particular request
>>>
>>
>>  Given that no water-tight technical solution to this problem has been 
>> suggested on this thread, perhaps this entire problem should be approached 
>> from a different angle. Instead of trying to *prevent *server failures, 
>> let's *embrace *the fact the server will fail, and for a variety of 
>> reasons (bad user code, memory leak in Node or V8, etc). Then design the 
>> overall system around this assumption. Some ideas to that end:
>>  
>>1. Create a cluster of many more child processes than the number of 
>>CPU cores would suggest to reduce the impact of any one of them failing.  
>>2. Add graceful shutdown logic to reduce the impact of failures you 
>>can actually detect (like a JavaScript level exception), but do not 
>>*prevent* the server from failing. For example, within an uncaught 
>>exception handler shut down the HTTP server and only exit the process 
>> after 
>>requests in flight have completed. But exit it. 
>> 3. Build failure recovery at all levels of the application stack. 
>>For example, retry your ajax requests a number of times. 
>>4. Build planned failures into your code to keep yourself honest as 
>>to the quality of your recovery mechanism. Throw an unhandled exception 
>>within 5-10 minutes of every process start time, by design.   
>>5. Look at your software process to see if the bugs getting into the 
>>production code could be avoided in the first place.  
>>
>>   -- 
> -- 
> 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 Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com 
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to nodejs+un...@googlegroups.com .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] [Tutorial] One hackish way to compile js and native addons into nodejs...

2014-01-16 Thread Kevin Ingwersen
Well, I asked people to help me build a puzzle - and they helped me place one 
or another piece. And when I was done, I wanted to show how I completed it…for 
me, that is part of the concept of Open Source; sharing experience. :) Glad you 
apriciate that move!
Am Do. Jan. 16 2014 21:12:45 schrieb Charlie McConnell:

> I really like how you asked the mailing list how to do this, figured it out, 
> and then posted a detailed tutorial.
>  
> THIS is how this list should be used!
>  
> Good work.
>  
> --
> Charlie McConnell
>  
>  
> On Thu, Jan 16, 2014, at 11:22 AM, Kevin Ingwersen wrote:
>> Hey hey!
>>  
>> I just did some rally cool find-out that I am really happy about - and 
>> since, I want to share that too! :3
>>  
>> Caution: Make sure you have your toolchai  (Xcode, gcc, MSYS, …) ready to 
>> use and a copy of the latest nodejs source code. I myself am using v0.10.24.
>>  
>> Okay, let’s go.
>>  
>>  
>> 1. Your module or addon needs preparation.
>> Usual JS modules will work nicely, but…you need to make sure that you dont 
>> use too many modules. The ultra-basic require you will be having does not 
>> have all the functions you may expect. The in-binary require function seems 
>> to only look up actual filenames. In example, using require(„myFile“) will 
>> result in an internal lookup for myFile.js . Therefore, make sure your JS 
>> module is not using path-wise lookups - and especially, no subfolders. 
>> Subfolders simply dont exist in memory ;)
>>  
>> If you have a native addon, then you need to change your entry-code’s 
>> NODE_MODULE declaration. If it looked like this before:
>>  
>> NODE_MODULE(ph7, InitAll)
>>  
>> Then you now need to make it look like this:
>>  
>> NODE_MODULE(node_ph7, InitAll)
>>  
>>  
>> You’re best off by creating a copy of your module entirely, so you aren’t 
>> modifying your working copies.
>>  
>>  
>> 2. Telling GYP about the new files
>> Open node.gyp in a text editor, and locate the section named library_files. 
>> This is a long JSON array, and at the bottom, add your module files. I 
>> recommend creating a new folder called extra/ and placing your stuff inside 
>> there. And very importantly, you need to add a very special file to the list:
>>  
>>   'lib/_third_party_main.js',
>>  
>> This file will be called instead of nodejs’ main() function. As it does not 
>> exist, you may comment out this entry for now - but we’ll need it later. I 
>> have NOT tested this without this file - for now, I am just assuming you 
>> want your script to run always when the binary is launched, and want to pull 
>> the several moduels form within the binary itself.
>> After you filled this array, it’s time you fill up the native addon array - 
>> that is, if you have one. In my case, I do. So, to do so, locate sources, 
>> and add your sources at the bottom. If your souces need a custom include 
>> path, then you also need to edit include_dirs.
>>  
>>  
>> 3. Telling the node-code to use your native addon (Not required if you dont 
>> use one)
>> If you use a native addon, you must edit just one single file: 
>> src/node_extensions.h . The way it needs to be done should be ultra-obvious. 
>> But maybe I should explain anyway: This file contains a list of all the 
>> „internal extensions“. You may recognize, that all of them are prefixed with 
>> node_. That is a prefix to mark it as internal - and which is why I told you 
>> to change your native addon’s NODE_MODULE call too. So in that list, add 
>> your addon just like any other - save, exit.
>>  
>> 4. Building.
>> Now, after you added your sources, library_files, include_dirs and the like, 
>> you should have a nice GYP file. So, return to the nodejs source tree’s 
>> root, and run ./configure
>> Now you can use whatever you want to. In my case, i used —ninja, and then 
>> typed: ninja -C out/Release
>> Once you finished building, locate the new binary. If building and running 
>> seems okay, then it’s time to do some really cool things!
>>  
>> 5. Implentation time!
>> Before, I was telling you about _third_party_main.js. Now, this doesnt 
>> really exist so far. So what we now do, is create it. You may have commented 
>> it out previously (by putting a hashtag infront of it, like all the cool 
>> twitter kids do :p), but you may now uncomment it in node.gyp. Then, type: 
>> touch lib/_third_party_main.js
>> Now you can open that file - and edit it.
>> Note: Please consider the following:
>> - require() only looks up the filenames inside the binary - but no folders, 
>> or subfolders, or the like. This is a semi-low-level JS you are doing here. 
>> You can still interact with files and everything else like normal, but 
>> require acts a bit different than usual.
>> - To link against your native addon, use process.binding(). I,e,: var ph7 = 
>> process.binding(„ph7“);
>> The name you have to give in, is the same as the one in NODE_MODULE, just 
>> without the node_ prefix.
>> Once you are done, rebuild and te

Re: [nodejs] [Tutorial] One hackish way to compile js and native addons into nodejs...

2014-01-16 Thread Charlie McConnell
I really like how you asked the mailing list how to do this, figured it
out, and then posted a detailed tutorial.



THIS is how this list should be used!



Good work.



--
Charlie McConnell





On Thu, Jan 16, 2014, at 11:22 AM, Kevin Ingwersen wrote:

Hey hey!



I just did some rally cool find-out that I am really happy about -
and since, I want to share that too! :3



Caution: Make sure you have your toolchai  (Xcode, gcc, MSYS, …) ready
to use and a copy of the latest nodejs source code. I myself am
using v0.10.24.



Okay, let’s go.





1. Your module or addon needs preparation.

Usual JS modules will work nicely, but…you need to make sure that you
dont use too many modules. The ultra-basic require you will be having
does not have all the functions you may expect. The in-binary require
function seems to only look up actual filenames. In example, using
require(„myFile“) will result in an internal lookup for myFile.js .
Therefore, make sure your JS module is not using path-wise lookups -
and especially, no subfolders. Subfolders simply dont exist in memory
;)



If you have a native addon, then you need to change your entry-code’s
NODE_MODULE declaration. If it looked like this before:



NODE_MODULE(ph7, InitAll)



Then you now need to make it look like this:



NODE_MODULE(node_ph7, InitAll)




You’re best off by creating a copy of your module entirely, so you
aren’t modifying your working copies.





2. Telling GYP about the new files

Open node.gyp in a text editor, and locate the section
named library_files. This is a long JSON array, and at the bottom, add
your module files. I recommend creating a new folder called extra/ and
placing your stuff inside there. And very importantly, you need to add
a very special file to the list:



  'lib/_third_party_main.js',



This file will be called instead of nodejs’ main() function. As it does
not exist, you may comment out this entry for now - but we’ll need it
later. I have NOT tested this without this file - for now, I am just
assuming you want your script to run always when the binary is
launched, and want to pull the several moduels form within the binary
itself.

After you filled this array, it’s time you fill up the native addon
array - that is, if you have one. In my case, I do. So, to do so,
locate sources, and add your sources at the bottom. If your souces need
a custom include path, then you also need to edit include_dirs.





3. Telling the node-code to use your native addon (Not required if you
dont use one)

If you use a native addon, you must edit just one single file:
src/node_extensions.h . The way it needs to be done should be
ultra-obvious. But maybe I should explain anyway: This file contains a
list of all the „internal extensions“. You may recognize, that all of
them are prefixed with node_. That is a prefix to mark it as internal -
and which is why I told you to change your native addon’s NODE_MODULE
call too. So in that list, add your addon just like any other - save,
exit.



4. Building.

Now, after you added your sources, library_files, include_dirs and the
like, you should have a nice GYP file. So, return to the nodejs source
tree’s root, and run ./configure

Now you can use whatever you want to. In my case, i used —ninja, and
then typed: ninja -C out/Release

Once you finished building, locate the new binary. If building and
running seems okay, then it’s time to do some really cool things!



5. Implentation time!

Before, I was telling you about _third_party_main.js. Now, this doesnt
really exist so far. So what we now do, is create it. You may have
commented it out previously (by putting a hashtag infront of it, like
all the cool twitter kids do :p), but you may now uncomment it in
node.gyp. Then, type: touch lib/_third_party_main.js

Now you can open that file - and edit it.

Note: Please consider the following:

- require() only looks up the filenames inside the binary - but no
folders, or subfolders, or the like. This is a semi-low-level JS you
are doing here. You can still interact with files and everything else
like normal, but require acts a bit different than usual.

- To link against your native addon, use process.binding(). I,e,: var
ph7 = process.binding(„ph7“);

The name you have to give in, is the same as the one in NODE_MODULE,
just without the node_ prefix.

Once you are done, rebuild and test.



DONE :D



Again, this is more an experiment and soemthing i JUST learned. But I
saw projects such as nexe - and i just felt like sharing what I figured
out - it could be useful to them. If we can programaticaly edit
node.gyp and node_extensions.h, then we actually can patch a source
tree in order to allow „native modules“. I am still testing this thing
myself, but it surely is something quite interesting. I also haven’t
seen process.binding within the API docs or the like. I had to read it
off lib/os.js :p



Have fun with that lil thing! :D



Kind regards, Ingwie.

--

--

Job Board: [1]http://jobs.n

[nodejs] [Tutorial] One hackish way to compile js and native addons into nodejs...

2014-01-16 Thread Kevin Ingwersen
Hey hey!

I just did some rally cool find-out that I am really happy about - and 
since, I want to share that too! :3

Caution: Make sure you have your toolchai  (Xcode, gcc, MSYS, …) ready to use 
and a copy of the latest nodejs source code. I myself am using v0.10.24.

Okay, let’s go.


1. Your module or addon needs preparation.
Usual JS modules will work nicely, but…you need to make sure that you dont use 
too many modules. The ultra-basic require you will be having does not have all 
the functions you may expect. The in-binary require function seems to only look 
up actual filenames. In example, using require(„myFile“) will result in an 
internal lookup for myFile.js . Therefore, make sure your JS module is not 
using path-wise lookups - and especially, no subfolders. Subfolders simply dont 
exist in memory ;)

If you have a native addon, then you need to change your entry-code’s 
NODE_MODULE declaration. If it looked like this before:

NODE_MODULE(ph7, InitAll)

Then you now need to make it look like this:

NODE_MODULE(node_ph7, InitAll)
 
You’re best off by creating a copy of your module entirely, so you aren’t 
modifying your working copies.


2. Telling GYP about the new files
Open node.gyp in a text editor, and locate the section named library_files. 
This is a long JSON array, and at the bottom, add your module files. I 
recommend creating a new folder called extra/ and placing your stuff inside 
there. And very importantly, you need to add a very special file to the list:

  'lib/_third_party_main.js',

This file will be called instead of nodejs’ main() function. As it does not 
exist, you may comment out this entry for now - but we’ll need it later. I have 
NOT tested this without this file - for now, I am just assuming you want your 
script to run always when the binary is launched, and want to pull the several 
moduels form within the binary itself.
After you filled this array, it’s time you fill up the native addon array - 
that is, if you have one. In my case, I do. So, to do so, locate sources, and 
add your sources at the bottom. If your souces need a custom include path, then 
you also need to edit include_dirs.


3. Telling the node-code to use your native addon (Not required if you dont use 
one)
If you use a native addon, you must edit just one single file: 
src/node_extensions.h . The way it needs to be done should be ultra-obvious. 
But maybe I should explain anyway: This file contains a list of all the 
„internal extensions“. You may recognize, that all of them are prefixed with 
node_. That is a prefix to mark it as internal - and which is why I told you to 
change your native addon’s NODE_MODULE call too. So in that list, add your 
addon just like any other - save, exit.

4. Building.
Now, after you added your sources, library_files, include_dirs and the like, 
you should have a nice GYP file. So, return to the nodejs source tree’s root, 
and run ./configure
Now you can use whatever you want to. In my case, i used —ninja, and then 
typed: ninja -C out/Release
Once you finished building, locate the new binary. If building and running 
seems okay, then it’s time to do some really cool things!

5. Implentation time!
Before, I was telling you about _third_party_main.js. Now, this doesnt really 
exist so far. So what we now do, is create it. You may have commented it out 
previously (by putting a hashtag infront of it, like all the cool twitter kids 
do :p), but you may now uncomment it in node.gyp. Then, type: touch 
lib/_third_party_main.js
Now you can open that file - and edit it.
Note: Please consider the following:
- require() only looks up the filenames inside the binary - but no 
folders, or subfolders, or the like. This is a semi-low-level JS you are doing 
here. You can still interact with files and everything else like normal, but 
require acts a bit different than usual.
- To link against your native addon, use process.binding(). I,e,: var 
ph7 = process.binding(„ph7“);
The name you have to give in, is the same as the one in NODE_MODULE, 
just without the node_ prefix.
Once you are done, rebuild and test.

DONE :D

Again, this is more an experiment and soemthing i JUST learned. But I saw 
projects such as nexe - and i just felt like sharing what I figured out - it 
could be useful to them. If we can programaticaly edit node.gyp and 
node_extensions.h, then we actually can patch a source tree in order to allow 
„native modules“. I am still testing this thing myself, but it surely is 
something quite interesting. I also haven’t seen process.binding within the API 
docs or the like. I had to read it off lib/os.js :p

Have fun with that lil thing! :D

Kind regards, Ingwie.

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to no

[nodejs] _third_party_main.js: Using native modules?

2014-01-16 Thread Kevin Ingwersen
Hey.

I just read src/node.js up and down, and realized,that it exported some 
fucntions by its own already. It made me wonder something. Since this thing 
seems to be able to require like usual, would one be able to actually include a 
native module that way?

So if I added this to node.gyp:

‚custom/myModule.cc‘,
‚custom/myModule_wrapper.cc‘

and compiled, those two would obviously be compiled in as well. But, that 
doesnt yet mean that I can utilize a native addon - or?
Does node know if it has a special module compiled in already, and offer it for 
require() to be used? As far as I know, it actually uses dlopen and the like to 
dynamicaly link against the .node files and utilize them. So I was kind of in 
doubt if compiling a module into the binary woudl actually do it?

Kind regards, Ingwie

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Re: Changing nodejs' main behavior?

2014-01-16 Thread Kevin Ingwersen
Had to add the file to node.gyp, but then it worked :) Thanks!
Am Do. Jan. 16 2014 17:48:18 schrieb mscdex:

> On Thursday, January 16, 2014 11:18:26 AM UTC-5, Kevin Ingwersen wrote:
> I have seen it once in an article, but I can not refind it anymore T.T 
> I read about the fact, that if you include a special file into the nodejs 
> source tree, that int main() will run that script instead of the normal 
> behavior. So, basically, one can override the main nodejs behavior with 
> javascript. But what was that filename again, and where do I place it? 
> 
> 
> https://github.com/joyent/node/blob/8aac118b69a10a134e57e8e066c56ba7370d25cc/src/node.js#L65
>  


-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Installable nodejs apps

2014-01-16 Thread Piyush Ranjan
Thanks for the reply. I did try nexe and going ahead with it!

Piyush


On Thu, Jan 16, 2014 at 12:40 AM, Alex Kocharin  wrote:

>
> You might find this - https://github.com/crcn/nexe - interesting.
>
> --
> // alex
>
>
> 15.01.2014, 23:06, "Piyush Ranjan" :
>
> Hello
> I am in process of writing a nodejs application that would be accessible
> to users via npm install. For users, who do not have node installed, I
> would like to ship a standalone app. Is there a way to do with nodejs ? I
> do not have a UI in this application i.e. it is a CLI. I have seen
> node-webkit and I have played with http://appjs.com/.
>
> I would like to summarize what I want
> 1. node.js CLI app. All javascript, as much as possible.
> 2. Standalone
> 3. Should work on mac osx, windows and linux
> 4. Native GUI is not needed
>
> Any pointers would be really appreciated.
>
> Piyush
>
>
>
>
>
>
> --
> --
> 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 Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>  --
> --
> 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 Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Web Scraping Frameworks for Node.JS? (e.g. like Python's Scrapy)

2014-01-16 Thread // ravi
On Jan 16, 2014, at 11:19 AM, Matt  wrote:
> 
> node-phantom-simple on npm.
> 
> This was developed after 12 months of trying different phantom modules, 
> having weird failures with each (some don't work under cluster, some don't 
> work under load, some just randomly fail). It's used in production at the 
> last company I worked at, and has proved pretty rock solid compared to the 
> other options.
> 

Thank you, I’ll give it a go next time I need to use PhantomJS,

—ravi


-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Re: Changing nodejs' main behavior?

2014-01-16 Thread mscdex
On Thursday, January 16, 2014 11:18:26 AM UTC-5, Kevin Ingwersen wrote:
>
> I have seen it once in an article, but I can not refind it anymore T.T 
> I read about the fact, that if you include a special file into the nodejs 
> source tree, that int main() will run that script instead of the normal 
> behavior. So, basically, one can override the main nodejs behavior with 
> javascript. But what was that filename again, and where do I place it? 
>
>
https://github.com/joyent/node/blob/8aac118b69a10a134e57e8e066c56ba7370d25cc/src/node.js#L65
 

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] SSL and express

2014-01-16 Thread Reza Razavipour
I am supporting a node application using express, https module.
How can I determine which version of SSL i am using and what the settings 
are?


-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Web Scraping Frameworks for Node.JS? (e.g. like Python's Scrapy)

2014-01-16 Thread Matt
On Thu, Jan 16, 2014 at 11:11 AM, // ravi  wrote:

> On Jan 16, 2014, at 10:44 AM, Matt  wrote:
>
> And PhantomJS crashes randomly a lot (well, "a lot" depends on how much
> you're doing), so you have to deal with that. And the libraries for
> controlling it all suck except for the one I wrote (obviously I state that
> completely unbiasedly! /s).
>
>
> If you are going to shamelessly promote yourself :-) you might as well
> give us the link! Kidding aside, I am curious to see what you have.
>

node-phantom-simple on npm.

This was developed after 12 months of trying different phantom modules,
having weird failures with each (some don't work under cluster, some don't
work under load, some just randomly fail). It's used in production at the
last company I worked at, and has proved pretty rock solid compared to the
other options.

Matt.

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Web Scraping Frameworks for Node.JS? (e.g. like Python's Scrapy)

2014-01-16 Thread Matt
And PhantomJS crashes randomly a lot (well, "a lot" depends on how much
you're doing), so you have to deal with that. And the libraries for
controlling it all suck except for the one I wrote (obviously I state that
completely unbiasedly! /s).

But no, I don't know of anything that deals with all the issues around
throttling and so on. But it's not that hard to use something like Kue or
just async.queue to get some sane level of throttling implemented.


On Wed, Jan 15, 2014 at 10:36 PM, // ravi  wrote:

> On Jan 15, 2014, at 9:09 PM, Victor Hooi  wrote:
>
>
> I'm wondering if anybody knows of any web-scraping frameworks in Node.JS?
>
> Previously, there was node.io (https://github.com/chriso/node.io),
> however, the project was recently discontinued.
>
> Googling for Node.JS and web scraping, most of the guides online just talk
> about using requests and cheerio - it works, but you need to handle a whole
> bunch of things yourself (throttling, distributing jobs, configuration,
> managing jobs etc.).
>
>
> There are a few modules (node-crawler, simple-crawler, etc) that might
> help you. Ultimately you may have to wrap something around PhantomJS to
> deal with JS modifications to the DOM (which can in turn be a bit of a pain
> since PhantomJS for various reasons has to be run independently).
>
> —ravi
>
>
> On the Python side, I know of Scrapy (https://github.com/scrapy/scrapy),
> which is using Twisted for asynchronicity
> On the Ruby side, Nokogiri (http://nokogiri.org/) is meant to be good,
> although I haven't dived into it much.
> Is there anything equivalent in the Node world? Or what approaches are
> people using to tackle this problem?
>
>
>  --
> --
> 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 Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Web Scraping Frameworks for Node.JS? (e.g. like Python's Scrapy)

2014-01-16 Thread Arvind Gupta
You can also use scraper for web scrapping. Have a look at it.

 https://nodejsmodules.org/tags/scraping


On Thu, Jan 16, 2014 at 9:14 PM, Matt  wrote:

> And PhantomJS crashes randomly a lot (well, "a lot" depends on how much
> you're doing), so you have to deal with that. And the libraries for
> controlling it all suck except for the one I wrote (obviously I state that
> completely unbiasedly! /s).
>
> But no, I don't know of anything that deals with all the issues around
> throttling and so on. But it's not that hard to use something like Kue or
> just async.queue to get some sane level of throttling implemented.
>
>
> On Wed, Jan 15, 2014 at 10:36 PM, // ravi  wrote:
>
>> On Jan 15, 2014, at 9:09 PM, Victor Hooi  wrote:
>>
>>
>> I'm wondering if anybody knows of any web-scraping frameworks in Node.JS?
>>
>> Previously, there was node.io (https://github.com/chriso/node.io),
>> however, the project was recently discontinued.
>>
>> Googling for Node.JS and web scraping, most of the guides online just
>> talk about using requests and cheerio - it works, but you need to handle a
>> whole bunch of things yourself (throttling, distributing jobs,
>> configuration, managing jobs etc.).
>>
>>
>> There are a few modules (node-crawler, simple-crawler, etc) that might
>> help you. Ultimately you may have to wrap something around PhantomJS to
>> deal with JS modifications to the DOM (which can in turn be a bit of a pain
>> since PhantomJS for various reasons has to be run independently).
>>
>> —ravi
>>
>>
>> On the Python side, I know of Scrapy (https://github.com/scrapy/scrapy),
>> which is using Twisted for asynchronicity
>> On the Ruby side, Nokogiri (http://nokogiri.org/) is meant to be good,
>> although I haven't dived into it much.
>> Is there anything equivalent in the Node world? Or what approaches are
>> people using to tackle this problem?
>>
>>
>>  --
>> --
>> 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 Google
>> Groups "nodejs" group.
>> To post to this group, send email to nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to nodejs+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> --
> 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 Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Changing nodejs' main behavior?

2014-01-16 Thread Kevin Ingwersen
Hey there.

I have seen it once in an article, but I can not refind it anymore T.T
I read about the fact, that if you include a special file into the nodejs 
source tree, that int main() will run that script instead of the normal 
behavior. So, basically, one can override the main nodejs behavior with 
javascript. But what was that filename again, and where do I place it?

Kind regards, Ingwie

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Web Scraping Frameworks for Node.JS? (e.g. like Python's Scrapy)

2014-01-16 Thread // ravi
On Jan 16, 2014, at 10:44 AM, Matt  wrote:
> And PhantomJS crashes randomly a lot (well, "a lot" depends on how much 
> you're doing), so you have to deal with that. And the libraries for 
> controlling it all suck except for the one I wrote (obviously I state that 
> completely unbiasedly! /s).
> 

If you are going to shamelessly promote yourself :-) you might as well give us 
the link! Kidding aside, I am curious to see what you have.

—ravi


> But no, I don't know of anything that deals with all the issues around 
> throttling and so on. But it's not that hard to use something like Kue or 
> just async.queue to get some sane level of throttling implemented.
> 
> 
> On Wed, Jan 15, 2014 at 10:36 PM, // ravi  wrote:
> On Jan 15, 2014, at 9:09 PM, Victor Hooi  wrote:
>> 
>> I'm wondering if anybody knows of any web-scraping frameworks in Node.JS?
>> 
>> Previously, there was node.io (https://github.com/chriso/node.io), however, 
>> the project was recently discontinued.
>> 
>> Googling for Node.JS and web scraping, most of the guides online just talk 
>> about using requests and cheerio - it works, but you need to handle a whole 
>> bunch of things yourself (throttling, distributing jobs, configuration, 
>> managing jobs etc.).
>> 
> 
> There are a few modules (node-crawler, simple-crawler, etc) that might help 
> you. Ultimately you may have to wrap something around PhantomJS to deal with 
> JS modifications to the DOM (which can in turn be a bit of a pain since 
> PhantomJS for various reasons has to be run independently).
> 
>   —ravi
> 
> 
>> On the Python side, I know of Scrapy (https://github.com/scrapy/scrapy), 
>> which is using Twisted for asynchronicity
>> On the Ruby side, Nokogiri (http://nokogiri.org/) is meant to be good, 
>> although I haven't dived into it much.
>> Is there anything equivalent in the Node world? Or what approaches are 
>> people using to tackle this problem?
>> 
> 
> 
> -- 
> -- 
> 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 Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> -- 
> -- 
> 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 Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Installable nodejs apps

2014-01-16 Thread José F . Romaniello
I don't know nexe, but another aproach is to make an installable for every
platform you will want to support.

I did one for windows (using msi) for one of our artifacts and I extracted
a template here:

https://github.com/auth0/nodejs-msi

I've read a series of blog posts from AJ ONeal about packaging node.js
applications:

http://blog.coolaj86.com/articles/how-to-create-an-osx-pkg-installer.html
http://blog.coolaj86.com/articles/how-to-create-a-debian-installer.html
http://blog.coolaj86.com/articles/how-to-create-an-innosetup-installer.html

I found this project interesting to create RPM (CentOS/ RedHat) from
node.js modules:

https://github.com/sfreire/njs2rpm

These package can include the node binary and license which is usually
small, or a dependency to the nodejs package deb/rpm/whatever if there is
one for the platform.

I like the approach of using the most native thing for the operative
system, so for instance, although "setup.exe" in windows are very common
"msi" is more standard.

I hope this help you,

regards


2014/1/16 Piyush Ranjan 

> Thanks for the reply. I did try nexe and going ahead with it!
>
> Piyush
>
>
> On Thu, Jan 16, 2014 at 12:40 AM, Alex Kocharin  wrote:
>
>>
>> You might find this - https://github.com/crcn/nexe - interesting.
>>
>> --
>> // alex
>>
>>
>> 15.01.2014, 23:06, "Piyush Ranjan" :
>>
>> Hello
>> I am in process of writing a nodejs application that would be accessible
>> to users via npm install. For users, who do not have node installed, I
>> would like to ship a standalone app. Is there a way to do with nodejs ? I
>> do not have a UI in this application i.e. it is a CLI. I have seen
>> node-webkit and I have played with http://appjs.com/.
>>
>> I would like to summarize what I want
>> 1. node.js CLI app. All javascript, as much as possible.
>> 2. Standalone
>> 3. Should work on mac osx, windows and linux
>> 4. Native GUI is not needed
>>
>> Any pointers would be really appreciated.
>>
>> Piyush
>>
>>
>>
>>
>>
>>
>> --
>> --
>> 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 Google
>> Groups "nodejs" group.
>> To post to this group, send email to nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to nodejs+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>  --
>> --
>> 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 Google
>> Groups "nodejs" group.
>> To post to this group, send email to nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to nodejs+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> --
> 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 Google
> Groups "nodejs" group.
> To post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@go

Re: [nodejs] Installable nodejs apps

2014-01-16 Thread José F . Romaniello
Another interesting point, is how you handle the case when different
applications needs to be installed in the same machine/server and these
depends on different version of node.

That's why on my msi example I bundle the node.exe executable directly on
the package.

I think nexe can make this easier.


2014/1/16 José F. Romaniello 

> I don't know nexe, but another aproach is to make an installable for every
> platform you will want to support.
>
> I did one for windows (using msi) for one of our artifacts and I extracted
> a template here:
>
> https://github.com/auth0/nodejs-msi
>
> I've read a series of blog posts from AJ ONeal about packaging node.js
> applications:
>
> http://blog.coolaj86.com/articles/how-to-create-an-osx-pkg-installer.html
> http://blog.coolaj86.com/articles/how-to-create-a-debian-installer.html
> http://blog.coolaj86.com/articles/how-to-create-an-innosetup-installer.html
>
> I found this project interesting to create RPM (CentOS/ RedHat) from
> node.js modules:
>
> https://github.com/sfreire/njs2rpm
>
> These package can include the node binary and license which is usually
> small, or a dependency to the nodejs package deb/rpm/whatever if there is
> one for the platform.
>
> I like the approach of using the most native thing for the operative
> system, so for instance, although "setup.exe" in windows are very common
> "msi" is more standard.
>
> I hope this help you,
>
> regards
>
>
> 2014/1/16 Piyush Ranjan 
>
>> Thanks for the reply. I did try nexe and going ahead with it!
>>
>> Piyush
>>
>>
>> On Thu, Jan 16, 2014 at 12:40 AM, Alex Kocharin  wrote:
>>
>>>
>>> You might find this - https://github.com/crcn/nexe - interesting.
>>>
>>> --
>>> // alex
>>>
>>>
>>> 15.01.2014, 23:06, "Piyush Ranjan" :
>>>
>>> Hello
>>> I am in process of writing a nodejs application that would be accessible
>>> to users via npm install. For users, who do not have node installed, I
>>> would like to ship a standalone app. Is there a way to do with nodejs ? I
>>> do not have a UI in this application i.e. it is a CLI. I have seen
>>> node-webkit and I have played with http://appjs.com/.
>>>
>>> I would like to summarize what I want
>>> 1. node.js CLI app. All javascript, as much as possible.
>>> 2. Standalone
>>> 3. Should work on mac osx, windows and linux
>>> 4. Native GUI is not needed
>>>
>>> Any pointers would be really appreciated.
>>>
>>> Piyush
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> --
>>> 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 Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to nodejs@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> nodejs+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to nodejs+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>  --
>>> --
>>> 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 Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to nodejs@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> nodejs+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to nodejs+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
>> --
>> 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 Google
>> Groups "nodejs" group.
>> To post to this group, send email to nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to nodejs+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message b

Re: [nodejs] Re: State of the art for request isolation in http servers?

2014-01-16 Thread Alain Mouette

Could you share how you did that?
I intend to test that kind of thing *before* building a real 
application, I am new to node (I came from C++) and it may be an 
interesting learning path (even if a bit difficult)


Thanks

Alain
=== Minha MesaXYZ:  ===

Em 16-01-2014 06:48, Bruno Jouhier escreveu:
No water-tight technical solution? There are some. Problem is that 
people are reluctant to go with them.


For me, the exception handling problem has been solved 3 years ago. 
Our server is robust. If someone messes up in some kind of obscure 
piece of code that nobody tested, nothing dramatic will happen. The 
client of the service will get a 500, the full stacktrace will be 
logged (with both long and row stacktraces) and the server will go on 
with the other requests.


Bruno

On Thursday, January 16, 2014 7:02:17 AM UTC+1, Tomasz Janczuk wrote:

In general I'm trying to solve the problem of keeping the
server running despite bad code in a particular request


Given that no water-tight technical solution to this problem has
been suggested on this thread, perhaps this entire problem should
be approached from a different angle. Instead of trying to
/prevent /server failures, let's /embrace /the fact the server
will fail, and for a variety of reasons (bad user code, memory
leak in Node or V8, etc). Then design the overall system around
this assumption. Some ideas to that end:

 1. Create a cluster of many more child processes than the number
of CPU cores would suggest to reduce the impact of any one of
them failing.
 2. Add graceful shutdown logic to reduce the impact of failures
you can actually detect (like a JavaScript level exception),
but do not /prevent/ the server from failing. For example,
within an uncaught exception handler shut down the HTTP server
and only exit the process after requests in flight have
completed. But exit it.
 3. Build failure recovery at all levels of the application stack.
For example, retry your ajax requests a number of times.
 4. Build planned failures into your code to keep yourself honest
as to the quality of your recovery mechanism. Throw an
unhandled exception within 5-10 minutes of every process start
time, by design.
 5. Look at your software process to see if the bugs getting into
the production code could be avoided in the first place.

--
--
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google 
Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to nodejs+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
--
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups "nodejs" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] restful api call error

2014-01-16 Thread Jyoti Chettri

Hi I'm trying integrate restful apis in client interface, but i;m unable to 
do it. From the following test code I'm getting error


{ [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND', 
syscall: 'getaddrinfo' }


Please help me to figure it out.

var https = require('https');

var options = {
  hostname: 
'ec2-54-251-114-65.ap-southeast-1.compute.amazonaws.com:8080/CTB-WS',
  path: '/rest/cities/sourceDestinationPairs',
  method: 'GET'
};

var req = https.request(options, function(res) {
  console.log("statusCode: ", res.statusCode);
  console.log("headers: ", res.headers);

  res.on('data', function(d) {
process.stdout.write(d);
  });
});
req.end();

req.on('error', function(e) {
  console.error(e);
});

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Stuck with an extension...

2014-01-16 Thread Kevin Ingwersen
Hey!

Okay, so, I hope I can ask for some v8 development help here.
I am developing an extension to allow in-process PHP execution. However, for it 
to configure, I want to store some values. Therefore, I do the following:

https://github.com/Deskshell-Core/node-ph7/blob/master/ph7_wrapper.h#L45
https://github.com/Deskshell-Core/node-ph7/blob/master/ph7_wrapper.cpp#L19

And then, I have a generic getter…which is here:

https://github.com/Deskshell-Core/node-ph7/blob/master/ph7_wrapper.cpp#L142

Now, the reason why i am highlighting include_path is, because that is where I 
am getting a segfault. Consider the following JS:

https://github.com/Deskshell-Core/node-ph7/blob/master/test.js

And the output is:

{ create: [Function] }
--> include_path
Segmentation fault: 11

… what am I doing wrong? It looks like the include_path variable is not 
allocated right - and hence, accessing it, results in that.

Any help? o-o

Kind regards, Ingwie

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Re: State of the art for request isolation in http servers?

2014-01-16 Thread Bruno Jouhier
No water-tight technical solution? There are some. Problem is that people 
are reluctant to go with them. 

For me, the exception handling problem has been solved 3 years ago. Our 
server is robust. If someone messes up in some kind of obscure piece of 
code that nobody tested, nothing dramatic will happen. The client of the 
service will get a 500, the full stacktrace will be logged (with both long 
and row stacktraces) and the server will go on with the other requests.

Bruno 

On Thursday, January 16, 2014 7:02:17 AM UTC+1, Tomasz Janczuk wrote:
>
> In general I'm trying to solve the problem of keeping the server running 
>> despite bad code in a particular request
>>
>
> Given that no water-tight technical solution to this problem has been 
> suggested on this thread, perhaps this entire problem should be approached 
> from a different angle. Instead of trying to *prevent *server failures, 
> let's *embrace *the fact the server will fail, and for a variety of 
> reasons (bad user code, memory leak in Node or V8, etc). Then design the 
> overall system around this assumption. Some ideas to that end:
>
>1. Create a cluster of many more child processes than the number of 
>CPU cores would suggest to reduce the impact of any one of them failing. 
>2. Add graceful shutdown logic to reduce the impact of failures you 
>can actually detect (like a JavaScript level exception), but do not 
>*prevent* the server from failing. For example, within an uncaught 
>exception handler shut down the HTTP server and only exit the process 
> after 
>requests in flight have completed. But exit it. 
>3. Build failure recovery at all levels of the application stack. For 
>example, retry your ajax requests a number of times.
>4. Build planned failures into your code to keep yourself honest as to 
>the quality of your recovery mechanism. Throw an unhandled exception 
> within 
>5-10 minutes of every process start time, by design.  
>5. Look at your software process to see if the bugs getting into the 
>production code could be avoided in the first place. 
>
>

-- 
-- 
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 Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.