0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00
astro/packages/db/test/fixtures/basics/astro.config.ts
2024-01-24 16:29:46 -06:00

51 lines
663 B
TypeScript

import { defineConfig } from 'astro/config';
import db, { defineCollection, field } from '@astrojs/db';
const Author = defineCollection({
fields: {
name: field.text(),
},
source: 'readable',
data() {
return [
{
name: 'Ben',
},
{
name: 'Nate',
},
{
name: 'Erika',
},
{
name: 'Bjorn',
},
{
name: 'Sarah',
},
]
}
});
const Themes = defineCollection({
fields: {
name: field.text(),
},
source: 'writable',
data() {
return [
{
name: 'One',
},
]
}
});
// https://astro.build/config
export default defineConfig({
integrations: [db()],
db: {
collections: { Author, Themes },
}
});