josh/nack — Issue #24: events.js:94     throw new Error('addListener only takes instances of Function'); 
Author: meetme2meat
Created: 2011-12-01 06:01:02+00:00
State: open

I just bump upon Copied your dummy Simple proxy code

```javascript

var http = require('http');
var nack = require('nack');

var app = nack.createProcess("/home/viren/myapp/config.ru");

http.createServer(function (req, res) {
app.proxy(req, res);
}).listen(8124, "127.0.0.1");

```
here is my config.ru
```ruby
require "config/environment"

use Rails::Rack::LogTailer
use ActionDispatch::Static
run ActionController::Dispatcher.new
```

but when I hit the URL http://127.0.0.1:8124

it server return me with the following error

events.js:94
throw new Error('addListener only takes instances of Function');
^
Error: addListener only takes instances of Function
at BufferedRequest. (events.js:94:11)
at Process. (/home/viren/node_modules/nack/lib/process.js:257:21)
at Process.proxy (/home/viren/node_modules/nack/lib/process.js:3:63)
at Server. (/home/viren/simple.proxy.js:7:7)
at Server.emit (events.js:67:17)
at HTTPParser.onIncoming (http.js:1124:12)
at HTTPParser.onHeadersComplete (http.js:108:31)
at Socket.ondata (http.js:1019:22)
at Socket._onReadable (net.js:683:27)
at IOWatcher.onReadable [as callback] (net.js:177:10)

I'm just new to nack and I assume It just a replacement for passenger is it

Kindly let me know if not