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

42 lines
600 B
TypeScript

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