|
3 | 3 | import { defineStack } from '@objectstack/spec'; |
4 | 4 | import { AppPlugin, DriverPlugin } from '@objectstack/runtime'; |
5 | 5 | import { ObjectQLPlugin } from '@objectstack/objectql'; |
6 | | -import { InMemoryDriver } from '@objectstack/driver-memory'; |
| 6 | +import { TursoDriver } from '@objectstack/driver-turso'; |
7 | 7 | import { AuthPlugin } from '@objectstack/plugin-auth'; |
8 | 8 | import CrmApp from '../app-crm/objectstack.config'; |
9 | 9 | import TodoApp from '../app-todo/objectstack.config'; |
@@ -35,8 +35,11 @@ export default defineStack({ |
35 | 35 | // The Runtime CLI will iterate this list and call kernel.use() |
36 | 36 | plugins: [ |
37 | 37 | new ObjectQLPlugin(), |
38 | | - // Register Default Driver (Memory) |
39 | | - new DriverPlugin(new InMemoryDriver()), |
| 38 | + // Register Default Driver (Turso — remote mode on Vercel, in-memory for local dev) |
| 39 | + new DriverPlugin(new TursoDriver({ |
| 40 | + url: process.env.TURSO_DATABASE_URL ?? ':memory:', |
| 41 | + authToken: process.env.TURSO_AUTH_TOKEN, |
| 42 | + })), |
40 | 43 | // Authentication — required for production (Vercel) deployments |
41 | 44 | authPlugin, |
42 | 45 | // Wrap Manifests/Stacks in AppPlugin adapter |
@@ -101,7 +104,10 @@ export const PreviewHostExample = defineStack({ |
101 | 104 | // Same plugins as the standard host |
102 | 105 | plugins: [ |
103 | 106 | new ObjectQLPlugin(), |
104 | | - new DriverPlugin(new InMemoryDriver()), |
| 107 | + new DriverPlugin(new TursoDriver({ |
| 108 | + url: process.env.TURSO_DATABASE_URL ?? ':memory:', |
| 109 | + authToken: process.env.TURSO_AUTH_TOKEN, |
| 110 | + })), |
105 | 111 | authPlugin, |
106 | 112 | new AppPlugin(CrmApp), |
107 | 113 | new AppPlugin(TodoApp), |
|
0 commit comments