generator icon indicating copy to clipboard operation
generator copied to clipboard

Documentation and possible ordering static assets logging

Open fluxsauce opened this issue 7 years ago • 0 comments

This is a cool project, helpful for a quick start. I used it to get up and running on a tutorial I'm writing.

Requests for static assets, such as the favicon and public in general, should be as early as possible. While some may find it useful to log static assets, it can be really distracting.

I'd like to propose tweaking those lines a bit.

var app = express();

// Static assets.
// Move this after the logger if you want to log requests for static assets.
// Uncomment when you've added a favicon to your project.
app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(express.static(path.join(__dirname, 'public')));

// view engine setup
...

If that sounds cool, I'll submit a PR.

fluxsauce avatar Jul 03 '17 04:07 fluxsauce