Getting Started
Setup
Quick setup guide for Nuxt Mongoose.
Installation
- Install
nuxt-mongooseto your dependencies.
npx nuxi@latest module add nuxt-mongoose
- Add
nuxt-mongooseto themodulessection of your nuxt config file.
nuxt.config.ts
export default defineNuxtConfig({
modules: [
'nuxt-mongoose',
],
})
That's it! You can now use Mongoose in your Nuxt app ✨
Options
You can configure the module by adding a mongoose section to your nuxt config file.
read more about Mongoose options.
nuxt.config.ts
export default defineNuxtConfig({
mongoose: {
// Options
},
})
If you want to configure only the uri just add MONGODB_URI in your .env file.
MONGODB_URI=YOUR_MONGO_URI
