obs/morgan-logger
Human-readable HTTP request logging for Express in development, combined format in production.
Provides: logging, logging:morgan
Requires: http:express, config:env
Conflicts with: logging
Dependencies
morgan@^1.10.1
Development only:
@types/morgan@^1.9.10(whenprovides('language:typescript'))
What it contributes to other files
| File | Slot | Line |
|---|---|---|
src/app.ts|js | imports | import morgan from 'morgan'; |
src/app.ts|js | imports | import { env } from './config/env.js'; |
src/app.ts|js | middleware | app.use(morgan(env.NODE_ENV === 'production' ? 'combined' : 'dev')); |
Use it
atarashi new my-app --add obs/morgan-logger
atarashi add obs/morgan-logger
Version 1.0.0. Format reference: Authoring blueprints.
Part of the atarashi documentation, written and maintained by Gautam Suthar.