Backend & Mongodb
Backend & Mongodb
Backend & Mongodb
Mongodb & Backend
Mongodb & Backend
100

What is an API?

  • Answer: A set of rules that allows applications to communicate.
100

What are HTTP methods?

  • Answer: GET, POST, PUT, PATCH, DELETE.
100

What is JSON?

  • Answer: JavaScript Object Notation, used for data exchange.
100

What is status code 200?

  • Answer: Request successful.
100

. Why should API Keys not be stored in Frontend?

Because anyone can inspect frontend code and steal the API key.

200

Difference between callbacks and promises?

  • Answer: Promises avoid callback nesting and improve readability.
200

What is Request Lifecycle?

Request arrives.
Middleware executes.
Route handler executes.
Business logic runs.
Response sent back.

200

. Why use Environment Variables?

To keep sensitive information secure and separate from source code.

200

What is CORS?

  • Answer: Cross-Origin Resource Sharing, controls access between different domains.
200

What is rate limiting?

  • Answer: Restricting the number of requests from a client.
300

What is MongoDB?

  • Answer: A NoSQL document-oriented database.
300
  1. What is ObjectId?
  • Answer: Unique identifier automatically generated by MongoDB.
300

What is the V8 Engine?


Answer: Google's JavaScript engine used by Chrome and Node.js.

300

What is package.json?


Answer: A file containing project metadata and dependencies.

300

 Why is Node.js fast?

Answer: Because it uses the V8 engine and non-blocking I/O.

400

What is a route parameter?

Answer: Dynamic value in URL (e.g., /user/:id).

400

What is centralized error handling?



Answer: Handling all errors through one middleware.

400

What happens if next() is not called?



Answer: Request may hang and never reach the response.

400

What is status code 401?



Answer: Unauthorized.

400

What is status code 400?

Answer: Bad request.

500

What is bcrypt?



Answer: Library for password hashing.

500

What is an access token?



Answer: Short-lived token for API access.

500

What is a session?



Answer: Server-side user state storage.

500

What is JWT?



Answer: JSON Web Token for authentication.

500

Difference Betweem  authentication and authorization? 

Answer:

Authentication - Verifying user identity.


Authorization - Checking user permissions.