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
715 stars 220 forks source link

STATIC | missed path and passed in the verification #138

Open fsramalho opened 7 years ago

fsramalho commented 7 years ago

The issue is regarding the exercise STATIC. My code (below) passed in the verification, but I didn't insert var path = require('path'); the requirement of 'pass' although I used it following the suggestion in the Hint.

My Code


var express = require('express');
var app = express();

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

app.listen(process.argv[2]);