CoverPhoto
Infosys logo
Premium Employer

Infosys

Verified
3.6
based on 39.5k Reviews
Filter interviews by
Node JS Developer
Skills
Clear (1)

20+ Infosys Node JS Developer Interview Questions and Answers

Updated 20 Sep 2024

Q1. How do you deploy your Nodejs application?

Ans.

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

Add your answer
right arrow

Q2. Do you follow agile or any other SDLC model?

Ans.

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.

Add your answer
right arrow

Q3. What is error first callback function?

Ans.

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

View 1 answer
right arrow

Q4. What would be the output of the setTimeOut JS functions?

Ans.

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

Add your answer
right arrow
Discover Infosys interview dos and don'ts from real experiences

Q5. What are the MongoDB code to connect from NodeJS backend?

Ans.

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

Add your answer
right arrow

Q6. Write a SQL command to get the TOP 3 list in a data set?

Ans.

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

Add your answer
right arrow
Are these interview questions helpful?

Q7. How you implemented Docker and Kubernetes?

Ans.

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

Add your answer
right arrow

Q8. Difference between Nodejs and Javascript.

Ans.

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

View 1 answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. What's swagger and how to add authentication in swagger

Ans.

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

Add your answer
right arrow

Q10. What is the difference between functional component and class components

Ans.

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

Add your answer
right arrow

Q11. Describe the work flow of Nodejs.

Ans.

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.

Add your answer
right arrow

Q12. What is callback function in NodeJS?

Ans.

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

Add your answer
right arrow

Q13. What is OAuth and how you implement it?

Ans.

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.

Add your answer
right arrow

Q14. Difference between Nodejs and Angularjs.

Ans.

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

Add your answer
right arrow

Q15. What is redux and redux toolkit

Ans.

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

Add your answer
right arrow

Q16. How you use Terraform?

Ans.

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

Add your answer
right arrow

Q17. What is api gateway in aws

Ans.

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

Add your answer
right arrow

Q18. What is AWS Mesh?

Ans.

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

Add your answer
right arrow

Q19. what is api and schema

Ans.

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

Add your answer
right arrow

Q20. What is event loop

Ans.

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

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Infosys Node JS Developer

based on 5 interviews
1 Interview rounds
Technical Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Recently Viewed
INTERVIEWS
Infosys
10 top interview questions
SALARIES
DXC Technology
SALARIES
Publicis Sapient
INTERVIEWS
Infosys
No Interviews
DESIGNATION
DESIGNATION
SALARIES
GlobalLogic
INTERVIEWS
Infosys
No Interviews
DESIGNATION
DESIGNATION
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter