Advanced NodeJS Questions Full (1)
Advanced NodeJS Questions Full (1)
1. What is Node.js?
Node.js is a runtime environment that allows executing JavaScript code outside the browser, built on
Chrome's V8 engine.
18. What is the difference between global and process objects in Node.js?
global provides global variables, while process gives access to runtime information like environment
variables.
23. What are JWT tokens and how are they used in Node.js?
JWT tokens are used for authentication, allowing secure transmission of user identity between client
and server.
34. What is the difference between synchronous and asynchronous file operations?
Synchronous file operations block execution, while asynchronous operations allow non-blocking I/O.
45. What are microservices and how are they implemented in Node.js?
Microservices architecture breaks applications into small services, implemented using frameworks
like Nest.js or Express.js.
50. What are some best practices for securing a Node.js application?
Best practices include validating input, securing dependencies, using HTTPS, enforcing
authentication, and limiting request rates.