feat: documentation
This commit is contained in:
51
docs/content/1.getting-started/1.setup.md
Normal file
51
docs/content/1.getting-started/1.setup.md
Normal file
@ -0,0 +1,51 @@
|
||||
# Setup
|
||||
|
||||
A Nuxt module for simplifying the use of Mongoose in your project.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Install `nuxt-mongoose` to your dependencies.
|
||||
|
||||
::code-group
|
||||
|
||||
```bash [pnpm]
|
||||
pnpm add nuxt-mongoose -D
|
||||
```
|
||||
|
||||
```bash [npm]
|
||||
npm install nuxt-mongoose -D
|
||||
```
|
||||
|
||||
```bash [yarn]
|
||||
yarn add nuxt-mongoose -D
|
||||
```
|
||||
|
||||
::
|
||||
|
||||
2. Add `nuxt-mongoose` to the `modules` section of your `nuxt.config` file.
|
||||
|
||||
```ts [nuxt.config]
|
||||
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](/getting-started/configuration).
|
||||
|
||||
```ts [nuxt.config]
|
||||
export default defineNuxtConfig({
|
||||
mongoose: {
|
||||
// Options
|
||||
},
|
||||
})
|
||||
```
|
||||
Reference in New Issue
Block a user