How To Install nodejs-cookie-parser on CentOS 7

In this tutorial we learn how to install nodejs-cookie-parser on CentOS 7. nodejs-cookie-parser is A Node.js module for cookie parsing with signatures

Introduction

In this tutorial we learn how to install nodejs-cookie-parser on CentOS 7.

Parse Cookie header and populate req.cookies with an object keyed by the cookie names. Optionally you may enabled signed cookie support by passing a secret string, which assigns req.secret so it may be used by other middleware.

We can use yum or dnf to install nodejs-cookie-parser on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install nodejs-cookie-parser.

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install nodejs-cookie-parser using yum by running the following command:

sudo yum -y install nodejs-cookie-parser

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-cookie-parser using dnf by running the following command:

sudo dnf -y install nodejs-cookie-parser

To uninstall only the nodejs-cookie-parser package we can use the following command:

sudo dnf remove nodejs-cookie-parser

References

Summary

In this tutorial we learn how to install nodejs-cookie-parser on CentOS 7 using yum and dnf.