You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
samples/compass_app/server/lib/routes/destination.dart

10 lines
245 B

import 'dart:io';
import 'package:shelf/shelf.dart';
Future<Response> destinationHandler(Request req) async {
final file = File('assets/destinations.json');
final jsonString = await file.readAsString();
return Response.ok(jsonString);
}