pkrumins/nodejs-proxy

error relating to split command on ubuntu 10.10 node.js 0.5.0 pre

Solid-Code opened this issue · 2 comments

node proxy.js
29 Apr 13:13:05 - Starting the proxy server on port '8080
29 Apr 13:13:05 - File './config/black_list' was not found.
29 Apr 13:13:05 - Updating allowed ip list.

/home/user/Projects/pkrumins-nodejs-proxy-594ff34/proxy.js:26
.split('\n')
^
TypeError: Object xx.xx.xx.xx <<< this was an IP address in the allow_ip_list file.
has no method 'split'
at /home/user/Projects/pkrumins-nodejs-proxy-594ff34/proxy.js:26:21

I have no idea, sorry.

If you add toString() just before the split("\n") call it will fix it:

see this post: #7