📜 ⬆️ ⬇️

A complete set of packages for development using NodeJS

Started studying NodeJS. Nowhere did I find the current stack of mainstream libraries (technologies) used in node. Therefore, I decided to make a list myself.

Attention : I didn’t have time to test all of the offered packages. Maybe an experienced hacker can offer better options. Picked up packages for recommendations in blogs. I looked at the descriptions, at the repository in Github (stars, forks).

Package Installer


npm is the package manager for node. It is installed along with the node (in the latest versions as it is).
Analogue in Ruby: Rubygems + Bundler. Analogue in PHP: Composer.

Search for packages


The official register . Non-official: npmsearch , packagefinder , nipster
')

Web technology stack


Web server


connect is an extensible HTTP server framework for Node, with support for high-performance plug-ins also known as middleware.
List of built-in and third-party plug - ins.
Analogue in Ruby: Rack.

Web framework


express minimalistic flexible node web application framework, providing a wide range of features for building single-, multi-page and hybrid web applications.
Selection of materials for the study . Russian documentation .
Analogue in Ruby: Sinatra. Analogue in PHP: Silex.

There are still geddy . It seems to be an analogue of Rails. But what kind of beast I do not know.

Base


mongoose . Elegant object modeling for mongodb for node.
Documentation and plugins
In other PLs, the term ORM (Object-relational mapping) is usually found in this place, but mongoose is ODM (Object-document mapping). Of course this happens not only in the node, for example in Ruby there is mongoid .

Templates


Jade is a high-performance template engine for node, which Haml had a strong influence on.
Documentation , of. documentation
Analog in Ruby: Slim ( akzhan ), Haml.

CSS Replacement


stylus . Expressive, dynamic, robust CSS
less . LESS extends CSS variables, mixins, operations and functions.
Analogs in Ruby: Sass, less.

Authentication


everyauth . Authentication and authorization (by password, via facebook, etc.) for your Connect and Express applications.
Bundle for mongoose and everyauth - mongoose-auth .
Analogs in Ruby: OmniAuth.

Sirian advises passportjs . Passport is the middleware for node. Very flexible and modular solution. Passport can easily be connected to any Express application.

Session storage


connect-mongo . MongoDB as session storage for Connect applications

Email


Nodemailer is an easy-to-use module for sending email using a node (using SMTP or Sendmail or Amazon SES) and Unicode supported.

Password Hashing


bcrypt . A library for hashing passwords.

Validation


node-validator is a library for checking, filtering and sanitizing strings.
Bundle for node-validator and Express - express-validator

i18n


i18n-node is a lightweight, simple module for internationalization with dynamic json repository. (Thanks maxatwork )

Logging


winston . Multi-transport asynchronous library for logging

log.io allows you to view log message streams in a single user interface.

Performing tasks


grunt command line utility for executing tasks. Like make, rake. Initially sharpened for front-end development (task for minifikatsi, running tests in the browser, etc.).
List of plugins .

Realtime (sockets, pub-sub)


Sockets


socket.io aims to make realtime applications possible in any browser and mobile device, erasing the differences between different transport mechanisms.
AHTUNG: everything is not so smooth, there are bugs hanging for more than a year . Some advise using SockJs

Redis


node_redis This is a complete client for Redis for node. It supports all Redis commands, including many newly added commands, like EVAL from Redis Experimental Brunch.

Testing


Testing framework


Mocha is a multi-functional test JavaScript framework that works in both node and browser, which makes asynchronous testing simple and fun. Mocha tests are performed sequentially, providing flexible and accurate reporting, handles uncaught exceptions.

BDD style


meettya recommended chai . This is a BDD / TDD assertion library for node and browser that can be used with any test framework.

should.js is expressive, easy to read, not depending on the test framework, assertion library for node.

HTTP moki


nock - HTTP library of mocks and expectations (expectations) for node

Moki


sinonjs . Autonomous test "spies", plugs and moki for javascript.

Coating


blanket Smooth code coverage for javascript
Analog Ruby: RCov

Simulate browser


zombie is a lightweight framework for testing client-side JavaScript in a simulated environment. No browser needed.
Ruby Analog: Capybara

Development


Debag


The node-inspector node debugger interface using WebKit Web Inspector. Article on Habré

Hot code reload


Nodemon will monitor changes to files in the directory in which nodemon was launched, and if they change, it will automatically restart the node application.
Alternative: supervisor

Debug + Hot code reload


nodev helps with running and debugging node applications during development. nodev runs node-inspector along with your application, and will reboot everything when files change.
nodev - fork nodemon.

Variable inspector


eyes - customizable inspector value for node
Analogue in Ruby: Awesome Print.

Utilities


Flow Control (Control-Flow)



step . A simple library for managing flow for a node. Makes parallel and sequential execution, as well as error handling painless.

async is a module that provides simple and powerful functions for working with asynchronous JavaScript.

Comparison of popular libraries for managing threads and another list of new libraries

Tools


meettya reminded about lodash . He's like underscore, but better.

underscore is an incredibly convenient JavaScript library, a sort of Swiss knife for js-developer, a set of utility functions that are so familiar to Prototype.js (or Ruby) fans. However, unlike Prototype.js, underscore does not modify the prototypes of embedded JavaScript objects.

Process monitor


forever is a simple tool to ensure that this script runs continuously (i.e. forever).

HTTP client


request is the easiest way to make HTTP requests.

Work with images


gm - GraphicsMagick for node

Console building


Colors in console


colors - colors and styles in the console for your node application.

For writing console applications


commander.js Complete command line solution for node applications

node-optimist - library for parsing options

Coffescript


coffee-script . It will be convenient to develop together with nodemon

Little magic instead of epilogue


I can not mention about meteor
Meteor is an open source platform for building high-quality web applications in the blink of an eye, whether you are an experienced developer or are just starting out.
Be sure to look at screencasts: 1 , 2 . Or read what they write about the meteor on Habré .
Nearest competitors: derby , socketstream

UPD Found on Habré another post with a set of packages

Source: https://habr.com/ru/post/165017/


All Articles