CatnibDB Nuxt module to interface with CatnibDB back-end.
- 🐱
useCat()
- 🙀
useCats()
- 😸
usePage()
- 😺
usePages()
- 😽
<CatnibdbPage slug="home" />
- Add
catnibdb
dependency to your project
# Using pnpm
pnpm add -D catnibdb
# Using yarn
yarn add --dev catnibdb
# Using npm
npm install --save-dev catnibdb
- Add
catnibdb
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({
modules: ["catnibdb"],
});
- Add
key
andurl
in your.env
file like this:
CATNIBDB_URL=""
CATNIBDB_KEY=""
or alternativly add them to Nuxt config like this:
export default defineNuxtConfig({
modules: ["catnibdb"],
catnibdb: {
url: "",
key: "",
},
});
That's it! You can now use CatnibDB in your Nuxt app ✨
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Release new version
npm run release