When I started this, I had so much intertest in the JS ecosytem and ORMs. I still have some intertest in javascript bit not ORMs.
Mevn ORM is a lightweight ORM for Express.js and MySQL that provides a clean, fluent interface for building queries and managing models. It is under maintenance mode and receives security updates. Development is paused, but the core ORM functionality is complete and usable.
const { Model } = require('mevn-orm')
class User extends Model {}
const user = await User.create({
name: 'John Doe',
email: 'john@example.com',
password: 'secret' // hash before storing
})
where
, first
, all
)Model
base class.create
, .find
, .update
, .delete
.where()
, .first()
, .all()
chaininghasOne
, hasMany
, belongsTo
)mysql2
for productiondotenv
supportThis project uses Vitest for testing.
npm install
npm run migrate
npm run test