expressjs / morgan

HTTP request logger middleware for node.js
MIT License
7.92k stars 533 forks source link

import statement #297

Open lamodots opened 2 months ago

lamodots commented 2 months ago

It will be nice if i can update doc to show how to do ES6 import of this great package

francis-Paul-code commented 2 weeks ago

Should already be able to do this, simply install the type declarations and then import

npm i morgan @types/morgan

// server file
import morgan from 'morgan';

worked for me