A Node.js library (v2.1.0) that provides a simplified interface for MySQL database operations, wrapping the popular mysql package with convenience methods like insert, getById, and deleteById. Supports connection pooling, automatic pool management, or single connections. Last updated in 2023; stable but low-maintenance. Differentiates itself by reducing boilerplate for common CRUD tasks compared to raw mysql usage, but lacks TypeScript types and modern async patterns.
npm install mysql-easierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure a pool, get a connection, insert a row, retrieve by ID, delete, and release resources.
Always call await conn.done() after finishing database operations, or use a try/finally block.
Update code to use conn.insert() instead of mysqlEasier.insert(). See migration guide in README.
Use instance methods on Connection objects returned by getConnection() or createConnection().
Install @types/mysql for basic type coverage or create a declaration file for mysql-easier.
Always include the 'database' property in the configuration object passed to configure() or createPool().
Run: npm install mysql
Use: const conn = await mysqlEasier.getConnection(); await conn.insert(...);
Ensure all database operations complete before closing the pool, and do not reuse connections after pool closure.