How To Install nodejs-winston on CentOS 7
Introduction
In this tutorial we learn how to install nodejs-winston
on CentOS 7.
What is nodejs-winston
This module is a multiple transport asynchronous logging library for Node.js. Winston is designed to be a simple and universal logging library with support for multiple transports. A transport is essentially a storage device for your logs. Each instance of a winston logger can have multiple transports configured at different levels. For example, one may want error logs to be stored in a persistent remote location (like a database), but all logs output to the console or a local file. There also seemed to be a lot of logging libraries out there that coupled their implementation of logging (ie, how the logs are stored/indexed) to the API that they exposed to the programmer. This library aims to decouple those parts of the process to make it more flexible and extensible.
We can use yum
or dnf
to install nodejs-winston
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install nodejs-winston.
Install nodejs-winston on CentOS 7 Using yum
Update yum database with yum
using the following command.
sudo yum makecache
After updating yum database, We can install nodejs-winston
using yum
by running the following command:
sudo yum -y install nodejs-winston
Install nodejs-winston on CentOS 7 Using dnf
If you don’t have dnf installed you can install DNF on CentOS 7 first.
Update yum database with dnf
using the following command.
sudo dnf makecache
After updating yum database, We can install nodejs-winston
using dnf
by running the following command:
sudo dnf -y install nodejs-winston
How To Uninstall nodejs-winston on CentOS 7
To uninstall only the nodejs-winston
package we can use the following command:
sudo dnf remove nodejs-winston
References
Summary
In this tutorial we learn how to install nodejs-winston
on CentOS 7 using yum
and dnf
.