File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
demos/django-react-native-todolist/library Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 1
1
export const AppConfig = {
2
- djangoUrl : '' , // This is base url to the Django project
3
- powersyncUrl : '' // This is the PowerSync instance url provided in the PowerSync dashboard
2
+ // These defaults are applicable when using local services
3
+ djangoUrl : 'http://localhost:6061' , // This is base url to the Django project
4
+ powersyncUrl : 'http://localhost:8080' // This is the PowerSync instance url provided in the PowerSync dashboard
4
5
} ;
Original file line number Diff line number Diff line change 1
1
import '@azure/core-asynciterator-polyfill' ;
2
2
import 'react-native-polyfill-globals/auto' ;
3
3
import React from 'react' ;
4
- import {
5
- AbstractPowerSyncDatabase ,
6
- RNQSPowerSyncDatabaseOpenFactory ,
7
- SyncStreamConnectionMethod
8
- } from '@powersync/react-native' ;
4
+ import { AbstractPowerSyncDatabase , PowerSyncDatabase , SyncStreamConnectionMethod } from '@powersync/react-native' ;
9
5
import { Buffer } from '@craftzdog/react-native-buffer' ;
10
6
import { AppSchema } from '../powersync/AppSchema' ;
11
7
import { DjangoConnector } from '../django/DjangoConnector' ;
@@ -26,13 +22,12 @@ export class System {
26
22
storage : any ;
27
23
28
24
constructor ( ) {
29
- const factory = new RNQSPowerSyncDatabaseOpenFactory ( {
25
+ this . powersync = new PowerSyncDatabase ( {
30
26
schema : AppSchema ,
31
- dbFilename : 'sqlite.db'
27
+ database : { dbFilename : 'sqlite.db' }
32
28
} ) ;
33
29
34
30
this . djangoConnector = new DjangoConnector ( ) ;
35
- this . powersync = factory . getInstance ( ) ;
36
31
}
37
32
38
33
async init ( ) {
You can’t perform that action at this time.
0 commit comments