Node.js libraries and modules you should use
Here is a growing selection of the most useful libraries for node.
Node JS Core modules
PATH Allow to work on path and urls. Split a path, take the file name…
FS : Allow to work on file to save file on disk…
Libraries for Node.js
CORS : Middleware to help make a CORS settings!
Morgan : Http request logging Middleware
Similar to the apache log, log the request that express made with the level of information you wish https://github.com/expressjs/morgan
Log action to a file or database, or online service https://github.com/winstonjs/winston
- Request && Request promise
Popular library to do http requests in an easy and powerful way. can pipe the result to other requests or to a file stream…
It’s port with promise powered by blue bird https://github.com/request/request-promise
Async & Promises
Async : Aynschronous call (a sort of lodash for asynchronous operation) http://caolan.github.io/async/docs.html#
Blue bird : Blue bird is the more popular promise library for node.js Though promise are in the core node.js language there are multiple arguments to keep using a library like blue bird.
Node Cache manager
This library seems to be the more complete. The advantage of this caching library is that it decoupled caching storage from caching configuration so it is possible to cache in redis, memory, file system…. https://github.com/BryanDonovan/node-cache-manager
Node cache https://github.com/mpneuried/nodecache
- Multer Node.js middleware for handling
multipart/form-data. > handle image upload more easily. Multer is based on busboy.
- busboy File multi part upload parser
- gridfs-stream Mongodb file streamer to save with gridFS
- node-formidable Parser for form and upload
Graphic magic : Image resizing…
- XLS Parser XlS Parser
Node excel Export : Export to excel
node Excel Export : Lees popular but the config seems more complete… and the doc is better
json2xls Transform a json to a xls with no settings at all (using “excel-export”: “~0.3.11” in the background) https://github.com/rikkertkoppes/json2xls/commits/master
js-xls a js framework to parse xls, and more generally spreadsheet formats… https://github.com/SheetJS/js-xlsx
- pretty-error Display errors && error stack in a more elegant way
- consolidate Consolidate template engines…to have a single API for all !
- mongoose simple random add findOneRandom && findRandom to get random document