4.0.1 • Published 1 month ago

@splendidlabz/astro v4.0.1

Weekly downloads
-
License
-
Repository
-
Last release
1 month ago

To use the our Astro components in your project, you need to add noExternal key to your astro.config.mjs file:

export default defineConfig({
  vite: {
    ssr: { noExternal: ['@splendidlabz/astro'] },
  },
})

Database Setup

This package uses Astro DB for database operations. To use the database features:

  1. Install required dependencies:
npm install @astrojs/db
  1. Add @astrojs/db to your Astro config:
import { defineConfig } from 'astro/config'
import db from '@astrojs/db'

export default defineConfig({
  integrations: [db()],
})
  1. Configure your database in astro.config.mjs:
export default defineConfig({
  db: {
    url: process.env.DATABASE_URL,
  },
})
  1. Create your database schema in db/schema.js:
import { defineTable, column } from 'astro:db'

export const User = defineTable({
  columns: {
    id: column.text({ primaryKey: true }),
    email: column.text({ unique: true }),
    // ... other columns
  },
})

// ... other tables
  1. Configure your database in db/config.js:
import { defineDb } from 'astro:db'
import * as schema from './schema.js'

export default defineDb({
  tables: schema,
})
4.0.1

1 month ago

4.0.0

2 months ago

4.0.0-beta.5

2 months ago

4.0.0-beta.4

2 months ago

4.0.0-alpha.3

2 months ago

4.0.0-alpha.2

2 months ago

4.0.0-alpha.1

2 months ago

4.0.0-alpha.0

3 months ago

3.0.0-alpha.9

3 months ago

3.0.0-alpha.8

3 months ago

3.0.0-beta.7

3 months ago

3.0.0-beta.6

3 months ago

3.0.0-alpha.5

3 months ago

3.0.0-alpha.3

3 months ago

3.0.0-alpha.2

3 months ago

3.0.0-alpha.1

3 months ago

3.0.0

3 months ago

3.0.0-alpha.0

3 months ago

1.3.0

8 months ago

1.2.1

8 months ago