Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/cli/src/actions/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ model Post {
`;

export const STARTER_MAIN_TS = `import { ZenStackClient } from '@zenstackhq/orm';
import { SqliteDialect } from '@zenstackhq/orm/dialects/sqlite';
import SQLite from 'better-sqlite3';
import { SqliteDialect } from 'kysely';
import { schema } from './zenstack/schema';

async function main() {
const client = new ZenStackClient(schema, {
const db = new ZenStackClient(schema, {
dialect: new SqliteDialect({
database: new SQLite('./zenstack/dev.db'),
}),
});
const user = await client.user.create({
const user = await db.user.create({
data: {
email: '[email protected]',
posts: {
Expand Down