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

node-custom-server morgan logging not working #66

Open
mbrowne opened this issue Jan 21, 2025 · 1 comment
Open

node-custom-server morgan logging not working #66

mbrowne opened this issue Jan 21, 2025 · 1 comment

Comments

@mbrowne
Copy link

mbrowne commented Jan 21, 2025

In the node-custom-server template, this line is too late:

app.use(morgan("tiny"));

This means that morgan won't run at all.

Personally I like just logging in production, since logging every request in development can be noisy. So I would move the morgan() call right below this line:

It could alternatively be moved above the "/assets" handler if you wanted to log requests to static assets as well.

@lasseklovstad
Copy link

I had the same issue for node-postgres template

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

No branches or pull requests

2 participants