[nodejs] Re: Forbidden response for request from Apache to node.js server

2013-04-17 Thread Andrey
You need to explicitly allow '127.0.0.1:3000/connect' to be accessed from 'localhost:8080' by serving CORS headers in your node.js application. See http://en.wikipedia.org/wiki/Cross-origin_resource_sharing On Wednesday, 17 April 2013 12:21:25 UTC+10, soewij wrote: Hello, I'm new to node.js.

[nodejs] Re: [ANN] pipeworks - fit small components into execution pipelines; create pipes, fit 'em together, start the flow!

2013-04-17 Thread chakrit
Nice. Might just try this out in my next project. I've actually built something similar back when I was doing C# but were not able to finish due a stupid compiler bug. It basically is a function(req, resp) { } thing, but which was made a first class thing in my framework and methods were

[nodejs] Re: Forbidden response for request from Apache to node.js server

2013-04-17 Thread soewij
Thank you Andrey, I follow your suggestion, then implement fix from enable-cors.org. Adding this, app.all('/', function(req, res, next) { res.header(Access-Control-Allow-Origin, *); res.header(Access-Control-Allow-Headers, X-Requested-With); next(); }); I also fix a bug in my code, to add

Re: [nodejs] Detecting stream.Writable#end call

2013-04-17 Thread Liam Breck
Issue filed: https://github.com/joyent/node/issues/5315 On Tue, Apr 16, 2013 at 10:53 AM, Liam Breck networkimp...@gmail.comwrote: So _flush would be called when .end() is called by the client of the writable stream? That seems like an essential feature of a writable stream. On Tue, Apr

[nodejs] Re: NPM Downloading Binaries

2013-04-17 Thread Floby
Wouldn't it be possible to publish a npm package with binaries which is arch-specific ? like if you're installing node-fibers, the compiled sourced for my machine would be published at node-fibers-linux-x86_64 or something like this. if the package doesn't exist for my architecture, then just

Re: [nodejs] Detecting stream.Writable#end call

2013-04-17 Thread Floby
It is not essential in the sense that you can already do something similar by listening to the 'finish' event. However observing oneself is a strange pattern. but one implentation of _flush could easily be: this.on('finish', this._flush); is that correct ? On Tuesday, 16 April 2013 19:53:17

Re: [nodejs] Detecting stream.Writable#end call

2013-04-17 Thread Liam Breck
Only if the 'finish' event could be suppressed by _flush() for other listeners, which I don't see a way to do... Alternatively the subclass can violate the defined API, and emit 'really_finished' from _flush() On Wed, Apr 17, 2013 at 1:12 AM, Floby florent.j...@gmail.com wrote: It is not

Re: [nodejs] Re: [ANN] pipeworks - fit small components into execution pipelines; create pipes, fit 'em together, start the flow!

2013-04-17 Thread Kevin Swiber
On Apr 17, 2013, at 2:42 AM, chakrit konsh...@chakrit.net wrote: One big glaring caveat with pipeworks though: Callback (the next() function in this case) should always accepts error as first argument. Otherwise you will break a lot of established pattern and convention with callback

[nodejs] fs no such file or directory

2013-04-17 Thread Timo Schmidt
Hello, I use this little Code: console.log(file.path + ' does: '+fs.existsSync(file.path)); fs.renameSync(file.path, __dirname+'/public/uploads/' + file.name); The first line says that the file I want to copy exists, but the second crashes, because it says that the file

[nodejs] Recommendations for modules to perform text search on a set of files (not using a database)

2013-04-17 Thread Cathy Sasaki
I'm new to JS/Node, and I'm giving myself a little project to see if I can get something working. Right now I need to decide upon a search module from npm. Suggestions? I need simply to search across a set of .txt or .md files. I'm not using a database, just a bunch of files in a folder. For

Re: [nodejs] fs no such file or directory

2013-04-17 Thread Ben Noordhuis
On Wed, Apr 17, 2013 at 10:56 AM, Timo Schmidt timo.schm...@elbformat.de wrote: Hello, I use this little Code: console.log(file.path + ' does: '+fs.existsSync(file.path)); fs.renameSync(file.path, __dirname+'/public/uploads/' + file.name); The first line says that

Re: [nodejs] [ANN] pipeworks - fit small components into execution pipelines; create pipes, fit 'em together, start the flow!

2013-04-17 Thread Matteo Collina
Hi Kevin, I have written a similar module (https://github.com/mcollina/kanban) for pipeline-processing. However our concern was about reducing parallelism of spawned processes. From the readme: var kanban = require(kanban); var board = new kanban.Board(); Then, you define some tasks:

Re: [nodejs] [NEW MODULE] walkie-watchie: The definitive fs.watch wrapper

2013-04-17 Thread Ken Perkins
Funny how these things seem to go, a former colleague of mine also released a new watch module yesterday. Maybe you guys could work together: https://github.com/tmont/gargoyle From: Gagle gagle...@gmail.commailto:gagle...@gmail.com Reply-To: nodejs@googlegroups.commailto:nodejs@googlegroups.com

Re: [nodejs] Recommendations for modules to perform text search on a set of files (not using a database)

2013-04-17 Thread Matt
Why not just use child_process with grep? On Tue, Apr 16, 2013 at 8:57 PM, Cathy Sasaki please.cathy.sas...@gmail.com wrote: I'm new to JS/Node, and I'm giving myself a little project to see if I can get something working. Right now I need to decide upon a search module from npm.

[nodejs] Re: NPM Downloading Binaries

2013-04-17 Thread Bradley Meck
Arch specific registries using multiple registry support is much simpler. npm --registries=ubuntu.x64.prebuilt.local registry.npmjs.org when requesting against ubuntu.x64.prebuilt.local a proxy would prebuild the module if it 404s. end. Can be done as an internal proxy as well. -- -- Job

Re: [nodejs] Recommendations for modules to perform text search on a set of files (not using a database)

2013-04-17 Thread Oleg Slobodskoi
lunr is much more than just grep ... @Cathy lunr is very well written, feel free to learn from it :) Oleg Slobodskoi twitter.com/oleg008 github.com/kof Am 17.04.2013 um 02:57 schrieb Cathy Sasaki please.cathy.sas...@gmail.com: I'm new to JS/Node, and I'm giving myself a little project to

[nodejs] Performance Counter

2013-04-17 Thread Rodrigo Canellas
Hi! I am extremely newbie to node.js (and even js), so I apologize in advance for any silly question. Well, we have an node.js app, and we'd like to publish in Windows Performance Monitor our own performance counters. I read, among others,

Re: [nodejs] Transform stream

2013-04-17 Thread Isaac Schlueter
Yep, thats it. Looks ok to me. Emitting entry events with the parsed data is a nice touch. Aside: I love that the conversation has changed from wtf, I have to implement all these things!? this is too hard! to wtf, i only have to implement this one thing?! this is too easy! :) On Wednesday,

Re: [nodejs] Transform stream

2013-04-17 Thread Stephen Bartell
I love the new streams. steams1 took an investment to grok. With stream2 being much simpler, the delta between understanding the two was so great, that I think most are just left to wonder, wtf Im doing this wrong, i dont get it, i used to get it... you guys f*cked everything up. At least

Re: [nodejs] Transform stream

2013-04-17 Thread Michael Nisi
Thanks Isaac. Same here. Being familar with the old API and following the conversation made me hesitate to actually try streams2. Glad I finally did. Hate it of course—way too easy. On Wed, Apr 17, 2013 at 8:43 PM, Stephen Bartell snbart...@gmail.com wrote: I love the new streams. steams1 took

[nodejs] String Stream

2013-04-17 Thread Alan Gutierrez
I need a stream that will gather it's results in a buffer or string for testing. I'm sure that someone has written one already. -- Alan Gutierrez ~ @bigeasy -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You

Re: [nodejs] String Stream

2013-04-17 Thread Michael Nisi
Try event-stream https://github.com/dominictarr/event-stream On Wed, Apr 17, 2013 at 10:48 PM, Alan Gutierrez a...@prettyrobots.com wrote: I need a stream that will gather it's results in a buffer or string for testing. I'm sure that someone has written one already. -- Alan Gutierrez ~

[nodejs] Re: how to handle following use case of readable streams

2013-04-17 Thread Bodo Kaiser
Found the solution. We need to create an array of readers on the source and extend the readable listener functions to check if the current listener is on position 0 in the readers array. When the listener has finished with its frame it can unshift chunk back if too much and then should remove

[nodejs] Library For Watching Changes on Arrays

2013-04-17 Thread Azer Koçulu
Hi All, If you're looking for a library to watch changes on an array, I've just created this; https://github.com/azer/watch-array Best Azer -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this

Re: [nodejs] String Stream

2013-04-17 Thread Isaac Schlueter
Alan, You can use stream.Passthrough for this. That's exactly what it's for. var pt = new stream.Passthrough() pt.setEncoding('utf8') // for strings, if you are into that sort of thing pt.write('foo'); pt.write('bar\n'); pt.write('ghoulie goo'); pt.end() assert.equal(pt.read(),

Re: [nodejs] String Stream

2013-04-17 Thread Alan Gutierrez
On Wed, Apr 17, 2013 at 05:05:45PM -0500, Isaac Schlueter wrote: You can use stream.Passthrough for this. That's exactly what it's for. var pt = new stream.Passthrough() pt.setEncoding('utf8') // for strings, if you are into that sort of thing pt.write('foo'); pt.write('bar\n');

Re: [nodejs] String Stream

2013-04-17 Thread Michael Nisi
Awesome! Obviously I still have to get off old habits. -- -- 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,

[nodejs] [ANN] STLJS Meetup, Thursday, April 18 @ 6:30pm

2013-04-17 Thread Michael Bradley, Jr.
Tomorrow! Thursday, 18 April 2013, 6:30pm Saint Louis, Missouri, USA STLJS Meetup in the The Able Few's corporate office: Michael Bishop will present Git Flow http://www.stljs.org/events/97547082/ Don't forget to RSVP! Following the presentation, we'll move into a hacking session to