沒有任何一個有充分的Rails的項目,我碰巧試圖啞代碼是否有任何人知道如何在Rails項目配置NACK /節點
VAR HTTP =需要(「HTTP」)配置nack; var nack = require('nack');
var app = nack.createProcess(「/ home/viren/myapp/config.ru」); (函數(req,res){app.proxy(req,res); })。listen(8124,「127.0.0.1」);
但報道我下面的錯誤
events.js:94
throw new Error('addListener only takes instances of Function');
^
Error: addListener only takes instances of Function
at BufferedRequest.<anonymous> (events.js:94:11)
at Process.<anonymous> (/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.<anonymous> (/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)
這裏是我的自定義機架文件
require "config/environment"
use Rails::Rack::LogTailer
use ActionDispatch::Static
run ActionController::Dispatcher.new
當然我會試試這個。如果你能夠實際記錄它,這將會非常有幫助 – Viren