Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nickcis/micro-morgan

Morgan http request logger middleware for zeit's micro framework.
https://github.com/nickcis/micro-morgan

Last synced: 3 months ago
JSON representation

Morgan http request logger middleware for zeit's micro framework.

Awesome Lists containing this project

README

        

# micro-morgan

> [Morgan](https://github.com/expressjs/morgan) HTTP request logger middleware for Zeit's [Micro](https://github.com/zeit/micro) framework.

## Install

```
$ npm install --save micro-morgan
```

## Usage

```js
const { send } = require('micro');
const morgan = require('micro-morgan');

module.exports = morgan('tiny')(async (req, res) => {
send(res, 200, 'Hello from micro')
});
```

Arguments are passed directly to morgan. For more information about formats, please check [morgan docs](https://github.com/expressjs/morgan)

## License

MIT © [Nicolas Cisco](https://nckweb.com.ar)