-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.native.js
24 lines (19 loc) · 875 Bytes
/
index.native.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import 'expo-dev-client';
import { registerRootComponent } from 'expo';
import App from './App';
import TrackPlayer from 'react-native-track-player';
import { Database } from '@nozbe/watermelondb'
import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite';
import { schema, modelClassArr as modelClasses } from "@/utils/schema";
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);
TrackPlayer.registerPlaybackService(() => require('./trackserver'));
const adapter = new SQLiteAdapter({
dbName: 'yeaplaymusic',
schema, jsi: false, onSetUpError: error => { console.error('sqlite db setup failure', error);}
})
export const database = new Database({
adapter, modelClasses
})