Baby ORM is a lightweight Node.js ORM for PostgreSQL, version 1.0.38. It provides a simple Query builder, an ActiveRecord-style model layer with support for timestamps, soft deletes, validations, and autoincrement or string IDs. It includes CLI tools for creating and running migrations. Compared to heavier ORMs like Sequelize or TypeORM, Baby ORM focuses on minimalism and straightforward usage for small to medium projects. Development appears slow with infrequent releases.
npm install baby-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic Query execution and ORM model usage with create operation.
Set environment variables before requiring baby-orm, e.g., process.env.PGHOST = 'localhost';
Ensure model file exports an object with config and fields properties. See documentation for exact schema.
Add columns to your migration or table schema manually before enabling these features.
Set BABYORM_DATABASE_DIR to the directory where your migration files reside.
Run 'npm install baby-orm --save' in your project root.
Use 'const { ORM } = require("baby-orm");'Set PGHOST to your PostgreSQL host (e.g., 'localhost' or an IP address).
Create a migration or manually create the table in PostgreSQL before using the model.
No dependency data recorded yet.