expressjs / expressjs/generator

Documentation and possible ordering static assets logging

Open
#165 0 comments 0 reactions 0 assignees View on GitHub
ideas
Dominant language
JavaScript
Stars
1.9k
Forks
548
PR merge metrics
No merged PRs in 30d

Description

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.

```js
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.