anges244
anges244

Reputation: 697

Express console shows many requests

I'm a little confused as to how each page load should work in express. Is this a normal log status writing all the static assets in the page or should it only show a the view requested? enter image description here

Upvotes: 1

Views: 494

Answers (1)

Nelson.li
Nelson.li

Reputation: 581

if you wanted to ignore logging requests for static files, but to continue logging routes and middleware defined after logger(), you would simply move static() above

app.use(express.static(path.join(__dirname, 'public')));
app.use(express.logger('dev'));
app.set('views', path.join(__dirname, 'views'));

Upvotes: 3

Related Questions