azat-co / expressworks

Learn Express.js from the author of one of the best books on Express.js—Pro Express.js— with this workshop that will teach you basics of Express.js.
MIT License
709 stars 220 forks source link

Stylish CSS "run" doesn't pass but "verify" does #132

Open brentpayton opened 7 years ago

brentpayton commented 7 years ago

expressworks version is 3.4.0

Here's my code:

`var express = require('express'); var app = express(); var path = require('path'); var port = process.argv[2];

app.use(require('stylus').middleware(path.join(__dirname, 'public')));

app.get('/home', function (req, res) { res.end('Hello World!'); });

app.use(express.static(process.argv[3] || path.join(__dirname, 'public')));

app.listen(port);`

I can see that main.css is being served by using curl localhost/main.css

When setting the debug variable with set DEBUG=express:* before running expressworks run [filename.js], I can see that the correct URL is being requested. Where [filename.js] is a placeholder in this document for my actual filename.

When I use expressworks run [filename.js] I get "Cannot GET /main.css"

I ended all node processes and tried again with no change.

expressworks verify [filename.js] passes, however.