Express.js
The Basics
- Server-side web and mobile application framework
- Language: Javascript
- Platform: Node.js
- Operating System: Its cross platform
- MVC pattern: Express supports the MVC architecture, helps the build websites in model driven structure
- Templating engines:
- comes with two templating engines, Jade and EJS
- Express builds:
- Single-page, multi-page and hybrid mobile and web apps
- Common back-end functions for web applications
- API's
- The express generator: Lets you create complex applications quickly
Express with Model-View-Controller (Routes/Controller)
Responsible for:
HTTP
Routing
View Rendering
Backend framework which runs on top of NodeJS
Standard web framework for NodeJS
Used to build web/mobile applications and APIs
What is Express.js?
Express is a modular web framework for Node.js. It is used for easier creation of web applications and services, Express simplifies development and it makes it easier to write secure, modular and fast applications.
Express handles the routing of requests to the right part of you application providing a REST API that the front-end can access using HTTP network calls.
Express can be used to different levels depending on the application and design choice.
The features could be written in Node.js, however this will lead to repeated code, and bugs can surface.
Express can run the app's full business logic, with Javascript files, a folder structure and generate HTML to be rendered by the users browser.
Alternatively Express can be used simply to provide a REST API.
Express is versatile in that is has no notion of a database, this concept is left up to third-party Node modules, allowing you to interface with nearly any database.
Express resources
https://www.tutorialspoint.com/expressjs/index.htm https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs