platform/packages/file_service/example/main.dart

12 lines
334 B
Dart
Raw Normal View History

2021-06-10 08:47:05 +00:00
import 'package:angel3_file_service/angel3_file_service.dart';
import 'package:angel3_framework/angel3_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
);
}