Express app encapsulates your API logical, which is your data abstraction. This is where you should keep up your DB logic or data models.

The server should be differently handled as its sole responsibility is to keep the app/website running. The separation of concerns will lead to optimization.

BY Best Interview Question ON 05 Jul 2019