Closed aclbros closed 8 years ago
I am seeing the same problem, using the following code as my solution:
var express = require('express');
var app = express();
app.get('/home', function(req, res) {
res.send('Hello World!')
});
app.listen(process.argv[2]);
I can run this file with node app.js 3000
and verify a curl to localhost:3000/home
works.
@trevorwhitney @aclbros compare versions of node and express. I have no idea why it's failing for you.
On 'npm/node_modules/expressworks/node_modules/workshopper-exercise/comparestdout.js' (line 23) there seems to be an error with the text formatting calculations. For a quick fix you can return s instead of doing the calculations.
function center (s, sz) { // var sps = Math.round((sz - vw.width(s, true)) / 2) // , sp = repeat(' ', sps) // return sp + s + sp + (sp.length != sps ? ' ' : '') return s; }
Could not find the real cause of the issue though...
@jtiple15 workaround is working for me. Thanks!
@azat-co Upgrading the workshopper-excercise version fixed the problem for me, I created a PR: https://github.com/azat-co/expressworks/pull/92
This is the error output:
Thanks!