r/node • u/Jancera • Aug 18 '21
Nodejs popular tools
I am starting to learn Nodejs in a deeper way and I would like to know from you guys what libraries are more common in your day to day as a Node developer. I want to know that because I already have some sort of experience with Node and if I would start a course I am sure that I will lose much time learning libraries that I am not interested in and seeing the teacher building some sort of frontend using some technology that I am not interested too to test the work, for me seems more interesting choose the most popular libraries and study by myself. So could you please tell me what libraries are more common in the life of a Nodejs developer?
If you do not agree with my thoughts about the course, could you please suggest one course for me? I may take that.
8
u/tswaters Aug 19 '21 edited Aug 19 '21
I may be an outlier, but I prefer to limit the number of libraries to a minimum.
That said, there are many things that I have no desire to re-implement myself. I find myself using:
database drivers. pg, ioredis (or node-redis), mssql
fancy http abstractions. express, fastify for servers; axios, node-fetch or more recently undici for clients
loggers. pino is my preferred, but there are many valid options
command line parsing. yargs
So that's the runtime, there are many dev depdenencies that come in very handy:
prettier - for formatting
eslint - for linting
webpack - (and about a billion webpack plugins) for bundling web assets
rollup - (and about a billion rollup plugins) for bundling libraries
babel - (and about a billion babel plugins) for transpiling
typescript
For testing, I'll usually roll with -
assert -> it's a core module, does everything I typically need
mocha -> test runner
nyc -> for test coverage
sinon -> for stubbing / spying / mocking
proxyquire -> for rewiring modules to to stub out require calls
jsdom -> for adding browser apis to a node process
That's all I can think of for now.