jurisv / nodejs.extdirect

Ext.Direct connector for node.js (npm module)
41 stars 16 forks source link

Fix routing when application is started by Passenger and not by node #20

Closed jgrocha closed 10 years ago

jgrocha commented 10 years ago

This fix solves the routing issue #19 when the application is started by Fusion Passenger. I've tested the suggested changes either starting the application with node and with Apache+Passenger. __dirname will point to the router.js folder, which is inside the node_modules folder. Removing the trailing path /node_modules/extdirect/lib gives us the application root folder.