Registry / devops / express-orm-mvc

express-orm-mvc

JSON →
library1.1.0jsnpmunverified

A lightweight MVC scaffolding library for Express.js 4.x that integrates node-orm2 for database modeling. Version 1.1.0 is the latest stable release; the package appears to be in maintenance mode with no recent updates. It provides a structured folder convention (models/controllers/views/config) and auto-loads models/controllers with Express and ORM configuration files. Unlike full-fledged MVC frameworks like Sails.js or Adonis, this is a minimal helper that gives developers full control over Express and ORM setup, making it suitable for small to medium projects that need a clean separation of concerns without heavy abstractions.

npm install express-orm-mvc
INSTALL
IMPORT
SIG · EXPRESS-ORM-MVC
E
express-orm-mvc
devopsjavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ const eom = require('express-orm-mvc');
✗ import eom from 'express-orm-mvc';
CommonJS module; ESM import may fail without a bundler.
callback
✓ eom(function(err) { ... });
✗ eom().then(...);
Accepts a Node-style error-first callback; no Promise returned.
model export
✓ module.exports = function(orm, db) { db.define('model', ...); };
✗ module.exports = { define: ... };
Models must export a function receiving orm and db objects.
controller export
✓ module.exports = { action: function(req, res) {} };
✗ module.exports = function() { ... };
Controllers must export an object with method handlers.

Minimal setup showing folder structure, settings, Express/ORM config, a model, a controller, and initialization.

const express = require('express'); const app = express(); // config/settings.js // module.exports = { // development: { // ip: '0.0.0.0', // port: 3000, // db: { driver: 'sqlite', filename: 'dev.db' } // } // }; // config/express.js // module.exports = function(app) { app.use(express.json()); }; // config/orm.js // module.exports = function(orm, db) { /* sync or hooks */ }; // config/routes.js // module.exports = function(app) { // app.get('/', require('./controllers/home').index); // }; // models/post.js // module.exports = function(orm, db) { // db.define('post', { title: String, content: String }); // }; // controllers/home.js // module.exports = { // index: function(req, res) { res.send('Hi'); } // }; require('express-orm-mvc')(function(err) { if (err) { console.error(err); process.exit(1); } console.log('App started'); });
Debug
Known issues
deprecatedPackage uses node-orm2 which is deprecated and unmaintained.
fix
Migrate to a modern ORM like Sequelize, TypeORM, or Prisma.
affects: >=0.0.0
gotchaModels are loaded alphabetically; relational models must be named carefully.
fix
Prefix dependent models with numbers, e.g., '0_user.js' before '1_post.js'.
affects: >=0.0.0
gotchaNo promise support; library uses error-first callbacks only.
fix
Wrap initialization in a callback; do not use .then().
affects: >=0.0.0
breakingExpress 4.x is required; Express 3.x applications will break.
fix
Upgrade Express to ^4.0.0 or use an older version of this library.
affects: >=1.0.0
deprecatedNo new releases since 2015; security vulnerabilities in dependencies not patched.
fix
Do not use in production. Fork or migrate to another library.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Module "express-orm-mvc" not found
npm package not installed or spelling mistake
fix
npm install express-orm-mvc --save
TypeError: eom is not a function
Incorrect import (e.g., default import with ESM instead of CommonJS)
fix
Use const eom = require('express-orm-mvc');
Error: orm is not defined
Model file exports an object instead of a function(orm, db)
fix
module.exports = function(orm, db) { ... };
Error: Cannot find module './config/settings'
Missing config/settings.js or wrong working directory
fix
Ensure the project structure has config/settings.js and run from the root.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
expressrequiredWeb framework for routing and middleware
ormrequiredObject-Relational Mapping for database operations
Agent activity
7 hits · last 30 days
node
6
Resources
express-orm-mvc — npm install express-orm-mvc · libregistry