Skip to content
atarashi
Documentation menu

orm/mongoose

Mongoose connection lifecycle and a starter model for a MongoDB project.

Provides: orm, orm:mongoose

Requires: database:mongodb

Conflicts with: orm

Files it writes

  • src/db/index.ts|js
  • src/models/user.ts (when provides('language:typescript'))
  • src/models/user.js (when provides('language:javascript'))

Dependencies

  • mongoose@^8.19.0

What it contributes to other files

FileSlotLine
src/index.ts|jsimportsimport { connectDatabase } from './db/index.js';
src/index.ts|jsbootstrapawait connectDatabase();

Use it

atarashi new my-app --add orm/mongoose
atarashi add orm/mongoose

Version 1.0.0. Format reference: Authoring blueprints.

Part of the atarashi documentation, written and maintained by Gautam Suthar.