Naf Egg Framework Mongoose

raw JSON →
0.6.12 verified Sat Apr 25 auth: no javascript

A custom Egg.js framework that integrates Mongoose for MongoDB ORM/ODM. Current version 0.6.12, with unknown release cadence. Provides a pre-configured Egg.js application with Mongoose connectivity, intended for rapid bootstrapping of Egg.js projects that use MongoDB. Differentiatiors: opinionated setup of Mongoose within the Egg.js ecosystem, reducing boilerplate. Alternatives: direct use of egg-mongoose plugin.

error Error: Cannot find module 'naf-framework-mongoose'
cause Package not installed or not in node_modules.
fix
Run 'npm install naf-framework-mongoose'.
gotcha Framework assumes Egg.js and Mongoose versions; mismatches may cause runtime errors.
fix Check peer dependencies and lock versions.
npm install naf-framework-mongoose
yarn add naf-framework-mongoose
pnpm add naf-framework-mongoose

Shows how to bootstrap an Egg.js application using the naf-framework-mongoose framework.

// {app_root}/index.js
const { startCluster } = require('naf-framework-mongoose');
startCluster({
  baseDir: __dirname,
  // port: 7001, // default to 7001
});