Finding packages in NPM that solve certain problem or that just can make your life easier as a developer can be difficult, and even more if you're new to Node.js.
When I started learning Node I asked some of my friends (which were already working in JS projects) to tell me the packages they used the most so I could level up my skills. The list I got was very basic and I've been adding more packages to it whenever I've found the need to use them.
I know this list is very short so maybe we can improve it together!
- express: web application server framework
- body-parser: middleware for express
- hapi: another web framework with built in plugins for auth, caching, cookies... (@Jeremy Shore)
- axios: to send http requests.
- dotenv: load variables from a .env file as environment variables. Super useful to load different database details depending on local, staging and production.
- mongoose - Interact with MongoDB
- json-server - Creates a fake REST API from a JSON file. Super useful when working in front-end projects or to mock an external API.
- jsonwebtoken: to generate ,validate and decode JWT
- bcrypt: encryption functions
- mocha: Testing framework
- chai: Assertion library
- jest: another test framework with coverage reports built in (@joelnet )
- chai-http: send http requests from your tests
- sinon: To create stubs
- nock: To create mocks
- nyc: To generate test coverage reports
- amqplib: For Rabbit MQ
- debug: prints debug messages in console
- watson: another debug library, has different levels of debug
- url: to parse URLs
- moment: to format dates
- lodash: helper functions to work with arrays, objects, numbers...
- nodemon: restart app when changing files
What do you guys think? Which are the essential packages you think a newbie should know about? I'll try to keep this list updated as much as I can so it can be helpful to others :)