File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change 11import { dev } from '$app/environment' ;
2- import { env } from '$env/dynamic/private' ;
32import { createClient , type Client } from '@libsql/client' ;
43
5- const { TURSO_DB_URL , TURSO_DB_AUTH_TOKEN } = env ;
6-
74const LOCAL_DB_PATH = dev
85 ? './local-dev-replica.db'
96 : '/app/data/turso-replica.db' ;
@@ -15,21 +12,8 @@ export const turso_client = (): Client => {
1512 return client_instance ;
1613 }
1714
18- const remote_url = TURSO_DB_URL ?. trim ( ) ;
19- if ( remote_url === undefined ) {
20- throw new Error ( 'TURSO_DB_URL is not defined' ) ;
21- }
22-
23- const auth_token = TURSO_DB_AUTH_TOKEN ?. trim ( ) ;
24- if ( auth_token === undefined ) {
25- throw new Error ( 'TURSO_DB_AUTH_TOKEN is not defined' ) ;
26- }
27-
2815 client_instance = createClient ( {
2916 url : `file:${ LOCAL_DB_PATH } ` ,
30- syncUrl : remote_url ,
31- authToken : auth_token ,
32- syncInterval : dev ? 60 : 300 ,
3317 } ) ;
3418
3519 return client_instance ;
You can’t perform that action at this time.
0 commit comments