Mean Stack Interview Questions

Mean Stack Interview Questions

Find latest mean stack interview questions and answers

Download Mean Stack Interview Questions PDF

Mean Stack Interview Questions

Node.js is a single-threaded but highly scalable system that utilizes JavaScript as its scripting language. It uses asynchronous, event-driven I/O instead of separate processes or threads. It is able to achieve high output via single-threaded event loop and non-blocking I/O.
Mean stack is combination four popular JavaScript-based technologies MongoDB, Express, AngularJS and Node that allows developers to develop complete web applications.
Express
is lightweight web framework for Node.js.It provides robust and scalable solutions to build single and multi-page web application. Express is inspired by Sinatra (Ruby framework).
Mongoose is a MongoDB Object Data Modeling (ODM) library for MongoDB and NodeJS.It provides a straight-forward, schema-based solution to model your application data. It includes built-in typecasting, validation, query building, business logic hooks and more, out of the box.
The purpose of Angular and Node Js is totally Different.
AngularJS is front-end framework that deals with UI and client side of an application while NodeJs is a runtime environment useful in building server-side applications.
Run below command to install express
npm install express --save
Routing is a mechanism used by frameworks to decide how a URL/endpoint is responded/handled by the server. Express provides an excellent way to handle applications routing. Below is basic code to handle routing in Express.
var express = require('express')
var app = express()

// respond with "hello world" when a GET request is made to the homepage
app.get('/', function (req, res) {
  res.send('hello world')
});