feat: Add an example app and misc fixes (#81)
This commit is contained in:
parent
5a8f9c91a0
commit
de7e22d91a
1 changed files with 9138 additions and 61 deletions
|
|
@ -1,12 +1,27 @@
|
|||
import 'package:serverpod/serverpod.dart';
|
||||
import 'package:serverpod_offline_sync_server/serverpod_offline_sync_server.dart'
|
||||
hide Endpoints, Protocol;
|
||||
|
||||
import 'src/demo_auth.dart';
|
||||
import 'src/demo_sync_tables.dart';
|
||||
import 'src/generated/endpoints.dart';
|
||||
import 'src/generated/protocol.dart';
|
||||
|
||||
/// The starting point of the Serverpod server.
|
||||
Future<void> run(List<String> args) async {
|
||||
// Initialize Serverpod and connect it with your generated code.
|
||||
final pod = Serverpod(args, Protocol(), Endpoints());
|
||||
final pod = Serverpod(
|
||||
args,
|
||||
Protocol(),
|
||||
Endpoints(),
|
||||
authenticationHandler: demoAuthenticationHandler,
|
||||
// TODO: Remove the duplicate [syncTables] argument from here and the
|
||||
// [initializeCrdtSync] call below.
|
||||
databaseInterceptor: (_, inner) => CrdtDatabase(
|
||||
inner,
|
||||
syncTables: demoSyncTables,
|
||||
),
|
||||
)..initializeCrdtSync(syncTables: demoSyncTables);
|
||||
|
||||
// Start the server.
|
||||
await pod.start();
|
||||
|
|
|
|||
Loading…
Reference in a new issue