Skip to content

rahulkumar-techo/userAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packages required for adavanced backend Api

Advanced Packages for Express.js

Express.js Middleware

  • 🛡️ helmet: Helps secure your Express apps by setting various HTTP headers.
  • 📦 compression: Middleware to compress HTTP responses.
  • 🔄 cors: Enables Cross-Origin Resource Sharing (CORS) in your Express app.
  • 📝 body-parser: Parses incoming request bodies in a middleware before your handlers.

Authentication & Authorization

  • 🔑 passport: Popular authentication middleware for Node.js.
  • 🔒 jsonwebtoken: Implementation of JSON Web Tokens for authentication.
  • 🔄 express-session: Middleware for managing sessions in Express.js.

Database Integration

  • 📊 mongoose: Elegant MongoDB object modeling for Node.js.
  • 🗄️ sequelize: A promise-based Node.js ORM for PostgreSQL, MySQL, MariaDB, SQLite, and Microsoft SQL Server.

Validation

  • joi: Schema description language and data validator for JavaScript objects.
  • 🛡️ express-validator: Middleware for validator.js to validate and sanitize user input.

Logging

  • 📝 morgan: HTTP request logger middleware for Node.js.

Security

  • 🔒 csurf: Middleware for CSRF protection.
  • 🚦 express-rate-limit: Basic rate-limiting middleware for Express.

Performance Optimization

  • redis: An in-memory data structure store used as a caching layer.
  • 📦 node-cache: Simple in-memory cache for node.js.

Testing

  • 🧪 jest: JavaScript Testing Framework with a focus on simplicity.
  • 🛠️ supertest: Super-agent driven library for testing HTTP servers.
  • 🔍 nock: HTTP mocking and expectations library for Node.js.
  • 🏃 mocha: Feature-rich JavaScript test framework running on Node.js.

Error Handling

  • 🛡️ express-validator: As mentioned before, it can also handle validation errors nicely.
  • 🚨 express-error-handler: Middleware for handling errors in Express applications.

API Documentation

  • 📖 swagger-ui-express: Middleware to serve Swagger UI for Express.
  • 📝 apidoc: Inline API documentation generator.

Dependency Injection

  • 🧩 awilix: Dependency injection container for Node.js apps.

Containerization and Deployment

  • 🐳 Docker: For containerization.
  • 🚀 PM2: Production process manager for Node.js apps.
  • ☁️ Heroku, AWS, Google Cloud, Azure: For deployment.



Some Backend Packages

  • 📝 morgan @types/morgan
  • 🚀 express @types/express
  • 📁 multer @types/multer
  • ☁️ cloudinary or uploadthing
  • 🔐 zod
  • 📦 compression @types/compression
  • 🏢 mongoose @types/mongoose
  • 🔍 http-errors
  • 🔄 ts-node-dev
  • 🔑 jsonwebtoken

Some DevOps Needs

Implementing Data Persistence

Connect your API to a database using an ORM (Object-Relational Mapping) library like Sequelize or Mongoose.

npm i sequelize

Learn more about Sequelize

Use Conditional Requests

Conditional requests are HTTP requests that are executed differently depending on specific HTTP headers.

  • Last-Modified (to indicate when the resource was last modified),
  • Etag (to indicate the entity tag),
  • If-Modified-Since (used with the Last-Modified header),
  • If-None-Match (used with the Etag header).

Node.js RESTful API with Conditional Requests

Learn more about HTTP Conditional Requests

Some APIs

About

this is react hook , which deals which Api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors