Nodejs-Express-Utils is a utility package for Node.js and Express applications, providing middleware, a MySQL ORM with built-in AES encryption, and various helpers. Version 1.1.36 is the latest stable release, with infrequent updates. The package integrates AES encryption directly into the ORM using MySQL's AES_ENCRYPT/AES_DECRYPT functions, simplifying encrypted field storage. It also offers common middleware like rate limiting, validation via JOI, and a query builder similar to an ORM. Compared to other ORMs like Sequelize or TypeORM, this library is lightweight and focused on encryption out-of-the-box, but lacks extensive community support and comprehensive documentation. It supports TypeScript via included type definitions.
npm install nodejs-express-utilsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing and using middleware (rate limiter, validation) and MySQL ORM with query method.
Set ENCRYPTION_KEY in environment or pass encryptionKey in options to mysqlORM constructor.
Use JOI schema format, e.g., Joi.string() instead of 'string' for better control.
Use an external store like Redis with the store option when scaling horizontally.
Update constructor to use { host, user, password, database } object instead of { connection: { host, user, password, database } }.Use import { mysqlORM } from 'nodejs-express-utils' instead of import mysqlORM from 'nodejs-express-utils'.Set process.env.ENCRYPTION_KEY to a valid key string before initializing ORM.
Provide schema as Joi.object({ name: Joi.string() }) instead of { name: 'string' }.No dependency data recorded yet.