Skip to content

Commit 83455be

Browse files
cleanup
1 parent c19d60c commit 83455be

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
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
45
};

demos/django-react-native-todolist/library/stores/system.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import '@azure/core-asynciterator-polyfill';
22
import 'react-native-polyfill-globals/auto';
33
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';
95
import { Buffer } from '@craftzdog/react-native-buffer';
106
import { AppSchema } from '../powersync/AppSchema';
117
import { DjangoConnector } from '../django/DjangoConnector';
@@ -26,13 +22,12 @@ export class System {
2622
storage: any;
2723

2824
constructor() {
29-
const factory = new RNQSPowerSyncDatabaseOpenFactory({
25+
this.powersync = new PowerSyncDatabase({
3026
schema: AppSchema,
31-
dbFilename: 'sqlite.db'
27+
database: { dbFilename: 'sqlite.db' }
3228
});
3329

3430
this.djangoConnector = new DjangoConnector();
35-
this.powersync = factory.getInstance();
3631
}
3732

3833
async init() {

0 commit comments

Comments
 (0)