
Infosys

20+ Infosys Node JS Developer Interview Questions and Answers
Q1. How do you deploy your Nodejs application?
Nodejs application can be deployed using various tools like Heroku, AWS, DigitalOcean, etc.
Use a cloud platform like Heroku, AWS, DigitalOcean, etc.
Create a production build of the application
Configure environment variables
Use a process manager like PM2 to manage the application
Use a reverse proxy like Nginx to handle incoming requests
Set up SSL/TLS certificates for secure communication
Q2. Do you follow agile or any other SDLC model?
Yes, I follow agile methodology for software development.
I believe in iterative development and continuous feedback.
I prioritize customer satisfaction and collaboration with the team.
I use tools like Jira and Trello to manage tasks and sprints.
I also follow the Scrum framework for daily stand-ups, sprint planning, and retrospectives.
Q3. What is error first callback function?
Error first callback function is a convention in Node.js where the first parameter of a callback function is reserved for an error object.
The error object is passed as the first argument to the callback function
If there is no error, the error object will be null or undefined
If there is an error, the error object will contain information about the error
This convention allows for consistent error handling in asynchronous operations
Example: fs.readFile(path, 'utf8', function(err...read more
Q4. What would be the output of the setTimeOut JS functions?
The setTimeout function in JavaScript is used to schedule a task to be executed after a specified delay.
The setTimeout function takes two parameters: a callback function and a delay time in milliseconds.
The callback function is executed after the specified delay.
The setTimeout function returns a unique identifier (timer ID) that can be used to cancel the execution of the callback function using the clearTimeout function.
The output of the setTimeout function itself is not sign...read more
Q5. What are the MongoDB code to connect from NodeJS backend?
To connect to MongoDB from NodeJS backend, use the 'mongodb' package and the 'MongoClient' class.
Install the 'mongodb' package using npm: npm install mongodb
Require the 'mongodb' package in your NodeJS file: const MongoClient = require('mongodb').MongoClient
Create a connection URL with the appropriate MongoDB server details: const url = 'mongodb://localhost:27017/mydatabase'
Use the 'MongoClient' class to connect to the MongoDB server: MongoClient.connect(url, function(err, db...read more
Q6. Write a SQL command to get the TOP 3 list in a data set?
SQL command to get the TOP 3 list in a data set
Use the SELECT statement to retrieve data from the table
Use the ORDER BY clause to sort the data in descending order
Use the LIMIT clause to limit the result set to 3 rows
Q7. How you implemented Docker and Kubernetes?
I implemented Docker and Kubernetes to containerize and orchestrate my NodeJS applications.
I used Docker to create containers for my NodeJS applications, ensuring consistency and portability.
I wrote Dockerfiles to define the environment and dependencies for each application.
I used Docker Compose to define and manage multi-container applications.
I used Kubernetes to orchestrate and manage the deployment, scaling, and monitoring of my NodeJS applications.
I created Kubernetes de...read more
Q8. Difference between Nodejs and Javascript.
Node.js is a runtime environment for executing JavaScript code outside of a web browser.
Node.js is built on the V8 JavaScript engine, while JavaScript is a programming language.
Node.js allows JavaScript to be run on the server-side, while JavaScript is primarily used for client-side scripting.
Node.js provides additional features and APIs for server-side development, such as file system access and networking capabilities.
JavaScript is used for web development, creating interac...read more
Q9. What's swagger and how to add authentication in swagger
Swagger is a tool for designing, building, and documenting APIs. Adding authentication in Swagger involves using security definitions and security requirements.
Swagger is a tool used for designing, building, and documenting APIs
To add authentication in Swagger, you can use security definitions to define authentication methods like API keys, OAuth, etc.
You can then specify security requirements in your Swagger documentation to enforce authentication for specific endpoints
For e...read more
Q10. What is the difference between functional component and class components
Functional components are stateless and use functional syntax, while class components have state and lifecycle methods.
Functional components are simpler and easier to read/write.
Class components have access to lifecycle methods like componentDidMount.
Functional components do not have access to state or lifecycle methods.
Functional components can use hooks like useState and useEffect to manage state and side effects.
Example: Functional component - const MyComponent = () => { r...read more
Q11. Describe the work flow of Nodejs.
Nodejs is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Nodejs uses an event-driven, non-blocking I/O model.
It is designed to build scalable network applications.
Nodejs uses modules to organize code.
It has a built-in package manager called npm.
Nodejs can be used for both server-side and client-side programming.
Q12. What is callback function in NodeJS?
A callback function in NodeJS is a function that is passed as an argument to another function and is executed later.
Callback functions are commonly used in asynchronous programming in NodeJS.
They allow us to handle the result of an asynchronous operation once it is completed.
Callback functions can be defined inline or as separate named functions.
They are often used with functions like setTimeout, readFile, and database queries.
Callback functions can accept parameters to pass ...read more
Q13. What is OAuth and how you implement it?
OAuth is an open standard for authorization that allows users to grant access to their data without sharing their credentials.
OAuth is used to authenticate and authorize users in applications.
It allows users to grant limited access to their data to third-party applications.
OAuth uses tokens to grant access instead of sharing credentials.
The OAuth flow involves the client, server, and the authorization server.
Popular OAuth providers include Google, Facebook, and Twitter.
Q14. Difference between Nodejs and Angularjs.
Nodejs is a server-side runtime environment while Angularjs is a client-side JavaScript framework.
Nodejs is used for building server-side applications while Angularjs is used for building client-side applications.
Nodejs is based on JavaScript and uses an event-driven, non-blocking I/O model.
Angularjs is a framework for building dynamic web applications using HTML, CSS, and JavaScript.
Nodejs is used for creating APIs, handling requests, and managing databases.
Angularjs is used...read more
Q15. What is redux and redux toolkit
Redux is a predictable state container for JavaScript apps. Redux Toolkit is the official, recommended way to write Redux logic.
Redux is a state management library for JavaScript applications, commonly used with React.
It helps in managing the state of an application in a predictable way.
Redux Toolkit is the official, recommended way to write Redux logic, providing utilities to simplify common Redux use cases.
It includes functions like 'createSlice' for defining Redux state sl...read more
Q16. How you use Terraform?
Terraform is used to automate infrastructure provisioning and management.
Terraform is a tool for defining and provisioning infrastructure as code.
It allows you to create, modify, and destroy infrastructure resources using declarative configuration files.
Terraform supports various cloud providers like AWS, Azure, and GCP.
You can define infrastructure resources such as virtual machines, networks, and storage using Terraform's domain-specific language (DSL).
Terraform provides a ...read more
Q17. What is api gateway in aws
API Gateway in AWS is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.
API Gateway allows you to create RESTful APIs that can be integrated with other AWS services like Lambda, DynamoDB, and S3.
It provides features like authentication, authorization, rate limiting, and caching to improve API performance and security.
API Gateway can also be used to transform and proxy requests to different backend ser...read more
Q18. What is AWS Mesh?
AWS Mesh is a service mesh that provides secure communication between microservices in a containerized application.
AWS Mesh is built on top of AWS App Mesh, which is a managed service for service mesh architecture.
It allows developers to easily monitor and control the communication between microservices.
AWS Mesh provides features like traffic routing, load balancing, service discovery, and observability.
It supports various protocols and platforms, including Node.js applicatio...read more
Q19. what is api and schema
API is a set of rules and protocols for building and interacting with software applications. Schema defines the structure of data in a database.
API stands for Application Programming Interface, it defines how software components should interact.
APIs can be used to access data or functionality from external sources, such as a web server or database.
Schema defines the structure of data in a database, including tables, fields, and relationships.
Schema can be used to enforce data...read more
Q20. What is event loop
Event loop is a mechanism in Node.js that allows non-blocking I/O operations to be performed asynchronously.
Event loop is responsible for handling asynchronous operations in Node.js
It allows Node.js to perform I/O operations without blocking the execution of other code
Event loop continuously checks the event queue for new events to process
Callbacks are used to handle the completion of asynchronous operations
Top HR Questions asked in Infosys Node JS Developer
Interview Process at Infosys Node JS Developer



Reviews
Interviews
Salaries
Users/Month

