Express.js: Difference between revisions
No edit summary |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 36: | Line 36: | ||
* [https://sequelize.org/ Sequelize] is an object-relation mapping (ORM) for Node. It supports Postgres, MySQL, MariaDB, SQLite, and Microsoft SQL Server. | * [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. | * [https://typeorm.io/#/ TypeORM] is another ORM from Node. | ||
** We currently use TypeORM for [https://tuneix.com https://tuneix.com]. | |||
* [http://knexjs.org/ Knex.js] is an SQL query builder. | * [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. | * [https://github.com/Vincit/objection.js Objection.js] is another ORM built on Knex.js. | ||
==Proxies== | |||
It is typically recommended to run express behind a proxy (e.g. Nginx) for production. | |||
See [https://expressjs.com/en/guide/behind-proxies.html guide: behind-proxies] for how to configure this such that the client hostname is correct. | |||
<syntaxhighlight lang="typescript"> | |||
app.set('trust proxy', 'loopback'); | |||
</syntaxhighlight> | |||
==Libraries== | ==Libraries== | ||
* [https://www.npmjs.com/package/express- | Some common libraries and middleware | ||
* [https://www.npmjs.com/package/express-rate-limit express-rate-limit] adds rate limiting. | |||
* [https://expressjs.com/en/resources/middleware/csurf.html csrf] adds csrf protection. | |||
==Resources== | ==Resources== | ||