Error: connect ECONNREFUSED
bhavinkamani opened this issue · comments
Bhavin commented
I am getting this particular error. However, node --harmony server.js
is working fine. I am on exercise#2 Routing
. I get the same error on kick-off-koa verify server.js
. Node
version is v0.11.14
, koa
is v0.12.2
and kick-off-koa
is v1.1.1
~/P/n/koa ∴ cat server.js
var koa = require('koa')
var app = koa();
app.use(function *(next) {
// skip the rest of the code if the route does not match
if (this.path !== '/') return yield next;
this.body = 'we are at home!';
});
app.listen(3000);
~/P/n/koa ∴ kick-off-koa run server.js
✗ Error connecting to submission server(http://localhost:64534/), options: {"timeout":5000,"maxRedirects":10}. Error: connect ECONNREFUSED
at exports._errnoException (util.js:742:11)
at Object.afterConnect [as oncomplete] (net.js:982:19)
^C
Yiyu He commented
you should listen to process.argv[2]
app.listen(process.argv[2] || 3000);
Bhavin commented
Thanks for your reply. Yep that worked... It was miss from my end. Just saw this documented when choosing a particular exercise.