4.0.1 • Published 6 months ago
@splendidlabz/astro v4.0.1
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:
- Install required dependencies:
npm install @astrojs/db- Add @astrojs/db to your Astro config:
import { defineConfig } from 'astro/config'
import db from '@astrojs/db'
export default defineConfig({
integrations: [db()],
})- Configure your database in
astro.config.mjs:
export default defineConfig({
db: {
url: process.env.DATABASE_URL,
},
})- 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- 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
6 months ago
4.0.0
6 months ago
4.0.0-beta.5
6 months ago
4.0.0-beta.4
6 months ago
4.0.0-alpha.3
7 months ago
4.0.0-alpha.2
7 months ago
4.0.0-alpha.1
7 months ago
4.0.0-alpha.0
7 months ago
3.0.0-alpha.9
7 months ago
3.0.0-alpha.8
7 months ago
3.0.0-beta.7
7 months ago
3.0.0-beta.6
7 months ago
3.0.0-alpha.5
7 months ago
3.0.0-alpha.3
8 months ago
3.0.0-alpha.2
8 months ago
3.0.0-alpha.1
8 months ago
3.0.0
8 months ago
3.0.0-alpha.0
8 months ago
1.3.0
12 months ago
1.2.1
12 months ago