platform/packages/file_service/example/main.dart

12 lines
342 B
Dart
Raw Normal View History

import 'package:protevus_file_service/protevus_file_service.dart';
import 'package:protevus_framework/protevus_framework.dart';
2018-07-12 19:58:30 +00:00
import 'package:file/local.dart';
void configureServer(Protevus app) async {
2018-07-12 19:58:30 +00:00
// Just like a normal service
app.use(
'/api/todos',
2021-06-26 12:06:30 +00:00
JsonFileService(const LocalFileSystem().file('todos_db.json')),
2018-07-12 19:58:30 +00:00
);
}