Ravindra BagaleCourses & study guides

Chapter 12: Technology Stacks — LAMP, LEMP, MEAN, MERN

Interview Questions

Q1. Expand LAMP, LEMP, MEAN and MERN.
LAMP: Linux, Apache, MySQL, PHP. LEMP: Linux, Nginx, MySQL, PHP. MEAN: MongoDB, Express, Angular, Node.js. MERN: MongoDB, Express, React, Node.js.
Q2. What is the difference between LAMP and LEMP?
LEMP replaces Apache with Nginx; PHP then runs in PHP-FPM, connected via FastCGI, instead of Apache's mod_php.
Q3. How is a React app deployed to production?
Run npm run build to produce static files, copy them to a web root, serve with Nginx using try_files ... /index.html, and proxy /api to the backend.
Q4. Why is MongoDB bound to 127.0.0.1 by default?
To prevent remote access; exposing it without authentication has led to many data breaches.
Q5. What is the role of Express in MERN?
Express is the Node.js web framework that implements the REST API — routing, request parsing and database access through a driver like Mongoose.
Q6. SQL vs NoSQL — when would you choose MongoDB?
MongoDB (document store) suits flexible or evolving schemas and JSON-like data; relational databases suit structured data with strong relationships and transactions.