MongoDB management
nuxt-feathers-zod can expose an optional MongoDB management layer from the embedded feathers/server/mongodb.ts template.
This capability belongs to the OSS core, but it remains:
- disabled by default,
- explicitly opt-in,
- separate from your application business services.
Options
ts
export default defineNuxtConfig({
feathers: {
database: {
mongo: {
url: 'mongodb://root:change-me@127.0.0.1:27017/app?authSource=admin',
management: {
enabled: true,
auth: true,
basePath: '/mongo',
exposeDatabasesService: true,
exposeCollectionsService: true,
exposeUsersService: false,
exposeCollectionCrud: true,
},
},
},
},
})Available options
enabled: enables the management layerauth: protects that surface or notbasePath: REST prefix, default/mongo(normalized automatically: trim, leading slash, trailing slash removed)exposeDatabasesService: exposes the database listexposeCollectionsService: exposes the collection listexposeUsersService: exposes MongoDB users managementexposeCollectionCrud: exposes CRUD operations on collections
Recommended positioning
Use it for:
- local or internal administration,
- technical diagnostics,
- bootstrap and maintenance.
Do not confuse it with:
- your application business model,
- end-user functional services.
Practical local bootstrap
To quickly run a local MongoDB compatible with your tests:
bash
bunx nuxt-feathers-zod add mongodb-composeCLI helper
You can patch nuxt.config.* directly from the CLI:
bash
bunx nuxt-feathers-zod mongo management \
--url mongodb://root:change-me@127.0.0.1:27017/app?authSource=admin \
--auth false \
--basePath /mongoThis command updates feathers.database.mongo.management and can also set the MongoDB URL when missing.
