Files
nuxt-mongoose/docs/content/1.getting-started/1.setup.md
Mr.Pal 771e071005 Updated the configuration setup docs.
Figured out that need to just add MONGODB_URI to .env if only need to provide URI.
2023-06-12 02:12:47 +06:00

973 B

Setup

A Nuxt module for simplifying the use of Mongoose in your project.

Installation

  1. Install nuxt-mongoose to your dependencies.

::code-group

pnpm add nuxt-mongoose -D
npm install nuxt-mongoose -D
yarn add nuxt-mongoose -D

::

  1. Add nuxt-mongoose to the modules section of your nuxt.config file.
export default defineNuxtConfig({
  modules: [
    'nuxt-mongoose',
  ],
})

::alert{ type=success } 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.

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