How to do it...

We want to install Winston, so the first step will be to apply the time-honored method:

 npm install winston --save
Currently, version 3.0 is in beta, but by the time you get this book, it will almost certainly be out of beta and ready for production. (By the way, I installed the beta version by using a slightly changed command: npm install winston@next --save; otherwise, I'd have gotten a 2.x.x version.) For (thorough!) documentation on Winston, check its own GitHub page at https://github.com/winstonjs/winston. Be careful with articles on the web, though, because there are some important changes in version 3, so most code won't work without some updating.

We want to look at a simple example about the usage of Winston. This ...

Get Modern JavaScript Web Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.