Getting Started

Summary: Node.js is an open source JavaScript run time environment that enables developers to do Server-Side Scripting, available to all the platforms for free it powered most of the web applications.

A best essential packages for Node.js application development

There are several packages available in Node.js that enables ease of developing and also helps in adding functionalities and specialties to our web applications. The package is available to install easily via npm but choosing one is rather difficult.

This post refers to some of the essential packages in Node.js that helps to develop.

These packages work on different areas of development i.e.

Backend, Database, Security and Encryption, Testing and other miscellaneous.

Packages according to their work are listed below

Backend related

Express Framework

To defining routing handle HTTP request and, to settle up middlewares Express Framework is used. The frameworks minimal structure allows any Node.js developer to quickly launch a functional application with the use of Express Generator.

It could be installed as

$ npm install express --save  

Nodemailer

To handle the mailing part, i.e. sending emails with Node.js we use Node Mailer. Helps to send email from server side just by providing credential priory.

Installation

npm install nodemailer –save

Hapi

Hapi.js is also a framework built for reusing code components instead of writing separate code for each.

Installation

Just push your command prompt/ terminal to the location where the package.json file resides and run the following.

npm init

npm install @hapi/hapi 

Database related

Mongoose

Mongoose is an object data modeling (ODM) library that provides a rigorous modeling environment for your data, Also, it interacts with MongoDB the database related work.

Installation

npm install mongoose

Security and Encryption

Jsonwebtoken

This package essentially aids in security used to generate, validate and decode JWT. Library needed for signing and verification.

Installation

npm install jsonwebtoken


Testing

Mocha

Mocha is a testing library for js, it feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun.

Installation

npm install -g mocha

Chai

Chai is also a unit testing library for js. Chai is an assertion library that is often used alongside Mocha. Chai is way too readable and writeable like natural language.

Installation

npm install chai

Apart from these some other miscellaneous packages are also available to install

For instance, Plugins

Nodemon, Prettier, eslint

Debugs

Watson, debug

These are the generally used packages essential for application development in Node.js, although several other packages are available having these installed, will serve most of your purpose of Developing like backend, Testing, Handling Database, etc.

 

Comments

Sign in to publish a comment

0 comments

Be the first to comment on this post.