Akash Rajvanshi wrote:Hello, I'm a beginner DevOps engineer. I work on nodejs for side projects. what are the some must known node patterns for API and security?
Really great question!
I am not sure it makes sense to talk about particular "code" patterns when it comes to API and security. But, in the context of Node.js, I would recommend to get familiar with the following resources:
- A good web framework (my favourite is Fastify https://www.fastify.io, but there is plenty of choice)
- Libraries for managing user authentication and various authentication protocols (Passport.js http://www.passportjs.org is probably the most famous, but Fastify has also plenty of official or community-driven plugins)
- Libraries for writing your API documentation (OpenAPI/Swagger). Most frameworks offer some kind of support to this, natively or through plugins
- Input validation libraries (have a look at https://github.com/ajv-validator/ajv for instance)
Let me know if this helps
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop