[nodejs] Re: Authentication on different subdomain

2015-05-12 Thread joel
data in your request (you shouldn't, > anyway). > > On a side note, you might want to consider removing cookies completely - > just return an auth-token on login response instead of session and cookies. > Then the client only has the token and you don't manage client stat

[nodejs] Re: Do I need cookie-parser?

2015-05-12 Thread joel
s, that's fine and > you can go on without them. > > On Tuesday, May 12, 2015 at 3:56:18 AM UTC+2, joel wrote: >> >> my express is using passport's local strategy. >> i just noticed i don't use the cookie-parser middleware and everything >> seems to

[nodejs] Do I need cookie-parser?

2015-05-11 Thread joel
my express is using passport's local strategy. i just noticed i don't use the cookie-parser middleware and everything seems to work fine. The passport example app have it - https://github.com/mjhea0/passport-local-express4/blob/master/app.js#L26 any ideas? -- Job board: http://jobs.nodej

[nodejs] Authentication on different subdomain

2015-05-11 Thread joel
I am working on existing code base that someone else wrote. it's Angular+Node.js. I am trying to split it into 2 apps - serving angular with nginx and API service using Node.js. I have nginx as a reverse proxy. the angular is running on port 3001 and the API on 3000. The problem is after a succ

[nodejs] cookie across subdomain

2015-05-11 Thread joel
I am trying to refactor existing express/angular app. The app is one codebase and I would like separate it into 2 parts: nginx that serves the angular app and node.js for the API (consumed by the angular). I setup nginx in front of both apps to act as reverse proxy so I can run both apps on my l

[nodejs] Re: Error compiling NodeJS (v0.10.25) on Debian Wheezy (7.0)

2014-01-31 Thread Joel S
Just wanted to say that I received this error as well. http://paste.debian.net/79458/ On Saturday, January 25, 2014 12:26:58 AM UTC+1, Blaine LaFreniere wrote: > > Hi, I'm receiving the following error while compiling NodeJS v0.10.25 on > Debian Wheezy 7.0 when following the instructions at > h

[nodejs] Re: Running Multiple Apps on Node Cluster

2013-10-14 Thread joel
This project might be helpful - https://github.com/oren/multi-sites TLDR: multiple sites live on a host, all behind http-proxy or nginx. Another option is to put each site on it's own host. On Sunday, October 13, 2013 5:50:59 AM UTC-7, Manish Ranade wrote: > > Hi, > > I have posted a question o

[nodejs] Re: how do I find the project folder location in a bin script?

2013-08-04 Thread Joel Brandt
By "project folder", I assume you mean "the folder the user is currently at in their terminal." If so, use process.cwd(): http://nodejs.org/api/process.html#process_process_cwd Hope that helps, -- Joel On Saturday, August 3, 2013 12:24:20 PM UTC-7, Mark Hahn wrote: >

[nodejs] Re: Error handling: current state of affairs?

2013-07-08 Thread joel
sorry, the /database route is actually being caught. it's the /throw route that is not. On Sunday, July 7, 2013 10:01:41 PM UTC-7, joel wrote: > > I started working a project <https://github.com/oren/domains-examples>that > demonstrate domains both on vanilla node and with

[nodejs] Re: Error handling: current state of affairs?

2013-07-07 Thread joel
I started working a project that demonstrate domains both on vanilla node and with express (it's based on the nodeconf session). take a look and feel free to send pull requests. from some reason the /database route does not get caught by the domain -

[nodejs] node-0.10.5 odd behavior

2013-04-30 Thread Joel Bair
If anyone help or slap me straight, I'd appreciate it.. I've built an app using express, cluster, async, mysql/mariadb. On my desktop (running fedora 17), the app works as designed/expected. Prior to deploying to production, I prepped a VirtualBox with the Cloud VPS OS (CentOS 5.9) - re-baked

Re: [nodejs] Why export both http.Server() and http.createServer()?

2013-04-15 Thread Joel Brandt
Aha! That makes sense. So, to summarize (as I understand it), the factory function exists so that you can cleanly write things like: s = require("http").createServer([listener]) instead of s = new (require("http").Server)([listener]) Thanks, Scott! Best, -- Joel

Re: [nodejs] Why export both http.Server() and http.createServer()?

2013-04-15 Thread Joel Brandt
{ allowHalfOpen: true }); > ... > } So, as I read it, the following should all be equivalent: s = http.createServer([listener]) > s = http.Server([listener]) > s = new http.Server([listener]) btw, here's the code if you want to have a look: https://github.com/joyent/node/blob/v0.8.23-rele

[nodejs] Why export both http.Server() and http.createServer()?

2013-04-15 Thread Joel Brandt
assume it's preferable to use that (perhaps for future-proofing one's code)? I'd also be interested to read any thoughts about when factory functions are preferable to constructors in the JS world. Thanks, -- Joel -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

[nodejs] requesting guidance on possible contributions: reassigning console.log to a different stream and enabling debugger programmatically

2012-12-27 Thread Joel Brandt
s to enable debugging using the hack above (and then do the debugging using node-inspector). But, it would be nice to provide feedback to the client when it fails (and to allow the user to set alternate ports). If we consider this change, what should the API be? How about something like: proce

[nodejs] Re: How to find out *if* there is a memory leak?

2012-11-27 Thread Joel Rolfe
I just put the following together on monitoring memory, and finding memory leaks. Very memwatch centered. Hope it helps: http://code.osnap.us/wp/?p=43 On Sunday, November 18, 2012 5:22:37 AM UTC-5, Felix E. Klee wrote: > > How do I find out if (not where) there is a memory leak in an app? > >

Re: [nodejs] Re: NodeJS Express Vs Python Flask : Benchmarking - help required

2012-11-27 Thread Joel Rolfe
esday, November 27, 2012 12:28:15 PM UTC-5, Barry Steyn wrote: > > Hi Joel > > >> Node can't really outperform if its getting the same number of client >> threads and they're all sitting around waiting for the DB to do a full >> table scan > > &g

[nodejs] Re: NodeJS Express Vs Python Flask : Benchmarking - help required

2012-11-27 Thread Joel Rolfe
How many client threads are you pushing from JMeter? Node can't really outperform if its getting the same number of client threads and they're all sitting around waiting for the DB to do a full table scan. As a side note, I would assume the variance in your response times is dependent on where

Re: [nodejs] Memory management and tuning

2012-11-05 Thread Joel Rolfe
hes use small complied code stubs that can > reference other objects e.g. hidden classes that are no longer > "relevant") and ensures that feedback is not stale. Again both flags > should not be used unless you understand V8 code generation pipeline > from alpha to omega. &

[nodejs] Re: How to use AngularJS routes with Express when a new page is requested?

2012-11-05 Thread Joel Rolfe
I have this exact stack - you don't need to worry about handling each specific possible route on the express side. Just put the entire app in a statically served directory on your node server, and set up a single route to that at the root context. app.use(_express.static("app")); My "app" dir

Re: [nodejs] Memory management and tuning

2012-11-03 Thread Joel Rolfe
f these off, then that's definitely something I'd want to capture. Otherwise, I figured I'd just list them for completion's sake. Other ones were: --lazy_sweeping --flush_code --cleanup_code_caches_at_gc On Friday, November 2, 2012 8:55:15 PM UTC-4, Ben Noordhui

[nodejs] Re: Benchmarking Express.js App

2012-11-03 Thread Joel Rolfe
Yeah, something is clearly wrong here - if you haven't already, you might use the express logger middleware to measure time spent server side handling the request. Add something like this (this is what I'm using - modify your desired fields accordingly) to the beginning of your express middle

[nodejs] Memory management and tuning

2012-11-02 Thread Joel Rolfe
Hi All, Relatively new to node (about a month under the belt), from a java/relational stack background. I spent today trying to understand memory management and configuration, as I found it difficult to find a single source of documentation on the various options and implications. I've collec

Re: [nodejs] ANN: Cast - The Open Deployment framework

2012-05-15 Thread joel
Thanks Paul. here is the video from Velocity conference: http://www.youtube.com/watch?v=aoktNxe310k http://www.cast-project.org/ seems to be down. any tutorials/docs of how to start using it? On Wednesday, April 27, 2011 10:18:18 AM UTC-7, Paul Querna wrote: > > On Wed, Apr 27, 2011 at 6:25 A