Skip to content

DB features

Nuxt Ignis contains following customizable DB related features:

Neon

Packages:

Neon is a serverless Postgres database that is designed to be fast, scalable, and easy to use. It provides a fully managed database service with automatic scaling and high availability.

The nuxt-neon module integrates Neon into your Nuxt application by providing useNeon composable that wraps around Neon Serverless Driver and provides convenient methods for executing SQL queries towards given Neon instance.

Neon integration is disabled by default. To enable it, you can use following environment variable:

.env
dotenv
NUXT_PUBLIC_IGNIS_DB_NEON_ENABLED=true

Or DB preset:

.env
dotenv
NUXT_PUBLIC_IGNIS_PRESET_DB=neon

Or equivalently in nuxt.config.ts:

nuxt.config.ts
ts
export default defineNuxtConfig({
  extends: ['nuxt-ignis'],
  ignis: {
    db: { neon: { enabled: true } },
    // or via preset:
    // preset: { db: 'neon' },
  },
})

Usage notice

To configure Neon connection you need to provide following env variables:

  • NUXT_NEON_HOST
  • NUXT_NEON_USER
  • NUXT_NEON_PASS
  • NUXT_NEON_DB

For details and more config options see the nuxt-neon docs.

Supabase

Supabase is an open-source Firebase alternative that provides a suite of tools for building applications, including a Postgres database, authentication, and real-time subscriptions.

The integration is provided via @nuxtjs/supabase module.

Supabase integration is disabled by default. To enable it, you can use following environment variable:

.env
dotenv
NUXT_PUBLIC_IGNIS_DB_SUPABASE_ENABLED=true

Or DB preset:

.env
dotenv
NUXT_PUBLIC_IGNIS_PRESET_DB=supabase

Or equivalently in nuxt.config.ts:

nuxt.config.ts
ts
export default defineNuxtConfig({
  extends: ['nuxt-ignis'],
  ignis: {
    db: { supabase: { enabled: true } },
    // or via preset:
    // preset: { db: 'supabase' },
  },
})

Usage notice

To configure Supabase connection you need to provide following env variables:

  • SUPABASE_URL
  • SUPABASE_KEY

For details and more config options see the @nuxtjs/supabase docs.

By default, module is run with types: false option. If you want to use Supabase types, pass the string path to your types definition file via NUXT_PUBLIC_IGNIS_DB_SUPABASE_TYPES (or ignis.db.supabase.types in nuxt.config.ts).