how to make proxy server listen to itself

I have used https://github.com/greim/hoxy proxy server to intercept the request and responses.

But for some reasons i also want to mock it for some functions, that it returns some response to the client when client requests on 9000 port. as my proxy server listening at 9000 port.

Now when i request on a 9000 port, i get :

request GET : 'http://localhost:9000'

ERROR: Error: invalid protocol: null

and then

ERROR: Error: connect ECONNREFUSED

How to get rid of these errors??

EDIT : Here is a few lines:

var proxy = new hoxy.Proxy({ port : 9000 });
proxy._server.on('request', function(){
   console.log('Request Recieved');
});
proxy.intercept({ phase : 'request' }, function(){
   //interception logic
});

I am not able to figure out what is the issue??