Express.js: Difference between revisions
Appearance
Line 17: | Line 17: | ||
See [https://expressjs.com/en/guide/routing.html Guide: Routing] | See [https://expressjs.com/en/guide/routing.html Guide: Routing] | ||
==Database== | |||
See [https://expressjs.com/en/guide/database-integration.html#mysql Express database integration] | |||
Express does not provide any special methods for interacting with databases. | |||
Below are some ways of interacting with databases. | |||
* [https://sequelize.org/ Sequelize] is an object-relation mapping (ORM) for Node. It supports Postgres, MySQL, MariaDB, SQLite, and Microsoft SQL Server. | |||
* [https://typeorm.io/#/ TypeORM] is another ORM from Node. | |||
* [http://knexjs.org/ Knex.js] is an SQL query builder. | |||
* [https://github.com/Vincit/objection.js Objection.js] is another ORM built on Knex.js. | |||
==Libraries== | ==Libraries== |
Revision as of 00:28, 17 August 2020
Express.js, also known as Express, is a Node.js web-framework.
Getting Started
To create a project, do
npx express-generator
or
npm i -g express-generator express [dir]
See express starter generator for more details.
Usage
Routing
See Guide: Routing
Database
See Express database integration
Express does not provide any special methods for interacting with databases.
Below are some ways of interacting with databases.
- Sequelize is an object-relation mapping (ORM) for Node. It supports Postgres, MySQL, MariaDB, SQLite, and Microsoft SQL Server.
- TypeORM is another ORM from Node.
- Knex.js is an SQL query builder.
- Objection.js is another ORM built on Knex.js.
Libraries
- express-ws adds websocket endpoints for express.