2024-10-13 01:45:27 +00:00
|
|
|
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';
|
|
|
|
|
2024-10-12 10:35:14 +00:00
|
|
|
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
|
|
|
);
|
|
|
|
}
|