Setup
Connect to Directus easily from Nuxt with following commands ✨
Installation
- Add
nuxt-directus
dependency to your project:
npx nuxi@latest module add directus
- Add it to your
modules
section in yournuxt.config
:
export default defineNuxtConfig({ modules: ['nuxt-directus']})
- Configure your Directus Server in the
nuxt.config
:
export default defineNuxtConfig({ modules: ['nuxt-directus'], runtimeConfig: { public: { directus: { url: "" } } }})
Options
You can customize the module's behavior by using the directus
property in nuxt.config
:
nuxt.config
export default { runtimeConfig: { directus: { // Options } }}
See the module options.
What do you think?
How helpful was this article?
Worst Doc ever 🥲
Not helpful 🤬
Helpful 😊
Super Helpful 😍
Table of Contents