Sobes.tech
Junior — Middle

Can you give an example of a system built on monolithic architecture?

sobes.tech AI

Answer from AI

A monolithic architecture is when all components of an application are assembled into a single unit, which is deployed and scaled as a whole.

An example of a system with a monolithic architecture in Node.js is a classic web application where the server, business logic, database access, and API interface are implemented in a single project and run as a unified application.

For example, an Express application where all routes, controllers, and models are in one repository and run by a single process:

const express = require('express');
const app = express();

app.get('/users', (req, res) => {
  // logic to get users
  res.send(users);
});

app.listen(3000, () => console.log('Server started'));

Such an application is an example of a monolith, as all parts are tightly coupled and deployed together.