Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation and possible ordering static assets logging #165

Open
fluxsauce opened this issue Jul 3, 2017 · 0 comments
Open

Documentation and possible ordering static assets logging #165

fluxsauce opened this issue Jul 3, 2017 · 0 comments
Labels

Comments

@fluxsauce
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants