[00:00] sebastia_ has joined the channel [00:01] sebastia_ has joined the channel [00:02] achiu has joined the channel [00:02] mjr_: micheil: how long do you think it'll be before your update to websocket-server? [00:02] mjr_: node-inspector is broken in the latest chrome [00:04] dmojoryder has joined the channel [00:05] LordMetroid: Success, I am getting closer and closer to my application framework by the minute [00:05] LordMetroid: Now I will have to go to bed though :( [00:05] CoverSlide: ACTION tucks LordMetroid in [00:05] [[zz]] has joined the channel [00:05] CoverSlide: nighty-night [00:06] micheil: mjr_: no idea yet. [00:06] micheil: mjr_: I've got to re-implement every websocket draft in the wild (75, 76, 07, 08) [00:07] micheil: mjr_: and I need to design the API to node-webscoket-protocol [00:07] TooTallNate: micheil: that sucks :O [00:07] CoverSlide: BAM! >> http://en.wikipedia.org/wiki/WebSocket#draft-ietf-hybi-thewebsocketprotocol-06 [00:07] micheil: I'm going to be working a lot on it over the next few weeks thanks to sponsorship from superfeedr.com [00:07] CoverSlide: micheil: you sound like a walking endorsement [00:07] vikstrous has joined the channel [00:08] micheil: CoverSlide: hey, they're doing the project a lot of help, as otherwise it probably wouldn't be getting the attention [00:08] micheil: as I'm both full-time employed and doing freelance work at the moment [00:09] Murvin: is there a way to do IP allow / deny , not just reading from the req.header['remote_addr'] or x-forwarded-... [00:09] jvduf: anyone has some good resources on doing safe and secure authentication using 100% javascript client side + node.js server side? [00:10] micheil: CoverSlide: also, it's kinda rare for companies to decide to invest in open source projects within node.js (they tend to write their own things) [00:11] CoverSlide: Murvin: read from req.socket.address() [00:11] dgathright has joined the channel [00:11] Guest29340 has joined the channel [00:11] micheil: hmm.. or req.socket.remoteAddr [00:11] Murvin: CoverSlide: but, then basically, I have to my only ipAddress filtering [00:11] Murvin: right? [00:12] Murvin: like, I have a whitelist or all the subset of IPs.. etc [00:12] CoverSlide: that is correct [00:12] Murvin: hmm.. [00:12] CarterL has joined the channel [00:12] CoverSlide: probably would be better to catch it on the 'connection' event rather than the 'request' event [00:13] slifty has joined the channel [00:13] Murvin: more work for me. lo.. let me take a look of npm and see if someone done that middleware already. lol [00:13] jtrudeau has joined the channel [00:13] CoverSlide: httpServer is basically a net.Server with some more abstraction [00:13] level09 has joined the channel [00:14] Murvin: ok [00:15] JasonSmith_ has joined the channel [00:15] mikl has joined the channel [00:15] mikl has joined the channel [00:15] jacobolus has joined the channel [00:15] keyvan has joined the channel [00:16] yorick_ has joined the channel [00:19] jj0hns0n has joined the channel [00:19] bnoguchi has joined the channel [00:19] craigpetchell has joined the channel [00:20] bnoguchi: jvduf: what are you looking for in particular? [00:22] jvduf: bnoguchi: so I don't know a lot about security yet, I want to know about the best practices of secure authorization for a full javascript client side app [00:22] mendel_: guys, if I call require multiple times for the same file.. will it require the file only once? [00:23] jvduf: bnoguchi: i've been looking into modules and got everyauth running without any problems... but there's no documentation on how safe it is, best practices of implementing it etc [00:23] bnoguchi: So you're using password based authentication? [00:24] jvduf: yes (got it linked to linkedin and twitter as well) but password based is the starting point [00:24] mikl has joined the channel [00:24] mikl has joined the channel [00:25] bnoguchi: jvduf: Passwords are sent in plaintext if not using https; the cookie only stores the session id, and all other sensitive session date (e.g., access tokens) are stored server-side [00:27] jamescarr: redis redis redis [00:30] patcito_ has joined the channel [00:30] necromancer: how does require() work? [00:30] necromancer: does it inject the other javascript into this JS file/ [00:31] jvduf: bnoguchi: yes that's what i've found so far... and it works flawlessly but I still don't have enough knowledge to judge if I implemented it securely [00:31] level09 has left the channel [00:31] SubStack: necromancer: no, the required source runs in a separate context [00:31] necromancer: oh ok [00:31] SubStack: you can implement require() yourself with fs and vm.runInNewContext [00:32] bnoguchi: jvduf: I'd recommend reading the Rails guide on security. It's applicable to all kinds of web apps. Covers several important things you should keep in mind wrt security - http://guides.rubyonrails.org/security.html [00:33] jvduf: bnoguchi: awesome that's exactly what I was looking for! [00:33] necromancer: SubStack: so how would i link all of my app's files together? [00:33] jvduf: background info to get started with this stuff and see how to implement it myself with node and for example everyauth [00:33] SubStack: there's no link step, this is javascript [00:34] mrryanjohnston: does it make sense to define a model in mongodb for an embedded document? The mongoose orm shows Comments as being defined but not defined as a model in the db as comments on a blog post. While this makes sense for comments (each comment would be unique to a blog post), I'd like to have one-to-many type of relationship in which many users can have the same reward [00:34] jaequery: guys i got a stupid question [00:34] jaequery: how can i just load an external js file as if it were "on" the current file? [00:34] SubStack: necromancer: http://nodejs.org/docs/v0.4.10/api/all.html#modules [00:35] theCole has joined the channel [00:35] mrryanjohnston: jaequery: check out the exports function [00:35] SubStack: jaequery: what are you trying to accomplish? [00:35] mrryanjohnston: jaequery: http://nodejs.org/docs/v0.3.1/api/modules.html [00:35] jaequery: my app.js is a big chunk of mess, i want to split it down to config.js, bootstrap.js, controllers.js [00:35] jaequery: im not a fan of exports as i have to pass objects around back and forth [00:36] jaequery: i just want to split the file into multiple files [00:36] jvduf: bnoguchi: going to read this and play some more with everyauth! thx man! [00:36] dreamdust has joined the channel [00:36] SubStack: jaequery: use exports [00:37] gazumps has joined the channel [00:37] necromancer: SubStack: can i also require() JSON files into a variable and expect that variable to become an object with the properties/values of that JSON? [00:37] SubStack: jaequery: also don't pass so much state around then [00:37] schwab has joined the channel [00:38] jaequery: so exports is the only way? [00:38] SubStack: no [00:38] SubStack: but they are the cleanest way [00:38] jaequery: but i really dont want to use exports [00:39] euforic: For some reason I'm not getting a response on my https post http://pastie.org/2419587 [00:39] jaequery: i like how things are since it gives me flexibility [00:39] progme has joined the channel [00:39] jaequery: i just need to split them in multiple files [00:39] mrryanjohnston: jaequery: you can't retain that flexibility with exports? just curious [00:40] jamescarr: express/jade question [00:40] jamescarr: is there anyway to do something like this: [00:40] jamescarr: h1= title || 'Default Title' [00:41] mrryanjohnston: jamescarr: https://gist.github.com/1167018 [00:41] jamescarr: currently I always get title is not defined [00:41] mrryanjohnston: will that work for your needs? [00:41] jamescarr: which annoys me [00:41] jaequery: with exports, the code starts to get bloated and ugly [00:41] jamescarr: lemme check [00:41] jaequery: very quickly [00:41] jaequery: i dont want to pass objects around thinking it already exists and what not [00:42] jamescarr: no worky [00:42] mrryanjohnston: her [00:42] mrryanjohnston: er* [00:42] mrryanjohnston: https://gist.github.com/1167018 [00:42] mrryanjohnston: second h1 shouldn' [00:42] mrryanjohnston: t have an = [00:43] jaequery: SubStack: so whats the solution [00:43] jamescarr: still get "title is not fefined" [00:43] jamescarr: frown [00:44] mrryanjohnston: https://gist.github.com/1167018 [00:44] mrryanjohnston: ^ ? [00:45] mrryanjohnston: er [00:45] mrryanjohnston: !== ** [00:47] jamescarr: that's it! [00:48] ditesh|cassini has joined the channel [00:49] jamescarr: thanks [00:49] theCole_ has joined the channel [00:50] akshatj has joined the channel [00:51] stalled has joined the channel [00:51] clifton has joined the channel [00:52] k1ttty has joined the channel [00:52] clifton: any recommendations on how to handle twitter authentication, you'd think there'd be a blog post somewhere with a basic example, but ive had none such luck [00:53] mrryanjohnston: clifton: everyauth [00:54] TooTallNate: clifton: it sucks. twitter oauth sucks [00:54] mikeal has joined the channel [00:54] clifton: boo [00:55] clifton: i know how bad facebook sucks because we use their oauth stuff in our main app [00:55] TooTallNate: i'm just bitching cause it's what I'm currently doing at work: Oauth integration with like 6 different services [00:55] TooTallNate: I like Facebook's better than Twitter's [00:55] devongovett has joined the channel [00:55] bnoguchi: clifton: Checkout out https://github.com/bnoguchi/everyauth [00:56] ggg has joined the channel [00:56] clifton: but i was hoping to use twitter oauth authentication for nodeko because it has short usernames and everyone has an account there [00:56] clifton: word im checking it out now [00:56] clifton: thanks bnoguchi [00:56] visnup: fyi we use everyauth/mongoose-auth for the nodeko website [00:57] tylerstalder has joined the channel [00:57] visnup: thanks bnoguchi! [00:57] mrryanjohnston: TooTallNate: Twitter oauth is actually really nice thanks to bnoguchi [00:57] bnoguchi: visnup: gotta get you that blog post soon :P [00:58] ggg: anyone experienced with express, mongoose and everyauth would mind looking at the following link, its an issue i cant resolve, thanksL http://stackoverflow.com/questions/6074245/node-mongoose-get-last-inserted-id [00:58] ggg: ahah, funny I just said that and that bnoguchi is there, I love your module [00:59] achiu has joined the channel [00:59] ggg: the everyauth module [00:59] mrryanjohnston: bnoguchi: ps, sorry for crapping all over the everyauth/mongoose-auth issue area in github. I was trying to figure it out for a while ;) [00:59] bnoguchi: mrryanjohnston: np [01:00] sebastia_ has joined the channel [01:00] ggg: bnoguchi: may i suggest to add in the doc with more detail how the auth flow process works, took me a while to understand its was /auth/facebook the link to follow [01:00] sebastia_: has anyone compared the performance of zeromq against dnode? [01:01] skm has joined the channel [01:01] bnoguchi: ggg: Yeah, planning on adding documentation for it when I document how to write your own modules [01:02] SubStack: sebastia_: performance? pfft [01:02] progme has joined the channel [01:02] ggg: is it on how to write your own module from javascript, or from lets say C/C++ to node,js module ? [01:02] jvdev has joined the channel [01:02] SubStack: sebastia_: I use dnode to serve up raw framebuffer data to the browser and it works pretty well [01:02] SubStack: in real time [01:02] bnoguchi: ggg: write your own everyauth module [01:03] ggg: ohhh...ok everyauth... nice [01:03] bnoguchi: ggg: i.e., the documentation will be about how to write your own module. [01:03] sebastia_: what kind of latency would one expect using dnode for IPC? [01:03] bnoguchi: ggg: and how the api works [01:03] bnoguchi: ggg: why do you need to "fetch" the last _id? [01:04] max_dev has joined the channel [01:04] SubStack: sebastia_: give http://browserling.com a spin [01:05] SubStack: all dnode [01:06] sebastia_: SubStack: more interested in IPC rather than server<->client [01:07] bradleymeck has joined the channel [01:08] SubStack: well it's even less latency in that case [01:08] neoesque has joined the channel [01:08] SubStack: sebastia_: also check out hookio, which is built on top of dnode [01:10] Bonuspunkt has joined the channel [01:11] sebastia_: yeah, I'm trying to decide between using hookio or writing a EventEmitter-ish wrapper around zeromq [01:11] mrryanjohnston: SubStack: browserling looks pretty sweet [01:11] Nicolas_ has joined the channel [01:12] Nicolas_: hi [01:12] mendel_: how do I emit a custom event on a unix connection? (with createConnection) [01:12] mendel_: I can't just conn.emit('myEvent')? [01:12] Nicolas_: How can i make link between Node.js & MongDB in a security way ? [01:12] scottschecter has joined the channel [01:13] SubStack: sebastia_: what are you building? [01:13] bnoguchi: Nicolas_: Set up mongodb auth from mongo shell [01:13] bnoguchi: Nicolas_: Then, the node.js driver has options for specifying username + password to the db [01:13] Nicolas_: bnoguchi Thanks ! [01:14] bnoguchi: Nicolas_: You won't be able to connect to the db otherwise [01:14] TooTallNate: mendel_: yes, what you did is fine [01:14] mendel_: TooTallNate: yeah, but on the server side socket.on('myEvent') isn't working [01:15] sebastia_: SubStack: a little HTML5 game server [01:15] ivan has joined the channel [01:15] eee_c has joined the channel [01:15] TooTallNate: mendel_: oh, I thought you were trying to do it within the same process [01:15] chrisconley has joined the channel [01:16] mendel_: no, inter process [01:16] TooTallNate: sounds like you want socket.io/dnode/these other communications frameworks [01:16] Sorella has joined the channel [01:16] mendel_: that's all too much, just want a simple unix connection between those two [01:16] korch: SubStack: raw framebuffer data, do you think it would be possible to "stream" over websockets and draw to a canvas in realtime and get enough fps to make it look like video? [01:17] TooTallNate: you're gonna need some form of IPC [01:17] mendel_: they are both event emitters, so it should work [01:17] TooTallNate: well they're in different process, so it doesn't work like that [01:17] korch: i have been kicking around an idea to stream video from a kinect, to node, then to a browser using websockets + canvas as a poor man's video stream [01:17] TooTallNate: mendel_: what you really need to do is send over "structured" data to the server via conn.write() [01:17] hydrozen has joined the channel [01:17] TooTallNate: then the server recieves that data as 'data' events [01:18] mendel_: one, I will create it with socket.write({event: 'MyEvent', data: 'blast'}) [01:18] TooTallNate: and you need to parse it into an event on the server [01:18] mendel_: yeah [01:18] mendel_: will do that [01:18] TooTallNate: i don't think you can write a JS object like that though [01:18] mendel_: JSON.stringify? [01:18] TooTallNate: you probably want to JSON.stringify() it first [01:18] mendel_: it's a buffer, so maybe it'll work [01:19] TooTallNate: korch: why not