Express.js: Difference between revisions
Appearance
Line 34: | Line 34: | ||
* [https://expressjs.com/en/starter/examples.html Express Examples] | * [https://expressjs.com/en/starter/examples.html Express Examples] | ||
* [https://expressjs.com/en/starter/faq.html Express FAQ] | * [https://expressjs.com/en/starter/faq.html Express FAQ] | ||
* [https://medium.com/better-programming/get-started-with-typeorm-mysql-and-express-js-653270a6a078 Getting Started TypeORM and Express.js by Songtham Tung] | |||
* [https://medium.com/better-programming/typeorm-migrations-explained-fdb4f27cb1b3 TypeORM Migrations Explained] |
Revision as of 12:49, 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.