Slife is a small MySQL ORM for Node.js beginners, currently at version 1.1.15 with an unknown release cadence (appears sporadically updated). Key differentiators: supports query chaining (select, insert, update, delete), TypeScript generics for auto-completion, union queries, and raw SQL. Compared to alternatives like Sequelize or TypeORM, Slife is minimal and has no active community. Its peer dependency is the mysql package (npm mysql).
npm install slifeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows instantiation, table creation, insert, select with where clause, and closing the connection.
Always append .run() to query chains when using TypeScript.
Consider using TypeORM or Sequelize for active support.
If using mysql2, you may need to adjust connection parameters or use a different ORM.
Add .run() after the query chain: await db.select('*').from('table').run();Use const Slife = require('slife') or import Slife from 'slife'.Create a global.d.ts file with declare module 'slife'; or use @ts-ignore.