summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--view/dart/ceres.dart13
1 files changed, 13 insertions, 0 deletions
diff --git a/view/dart/ceres.dart b/view/dart/ceres.dart
index 541e6ff..86073b6 100644
--- a/view/dart/ceres.dart
+++ b/view/dart/ceres.dart
@@ -1,6 +1,19 @@
import 'package:web/web.dart' as web;
+final RegExp recipeRegex = RegExp(r'^\/recipe\/(\d+)$');
+
void main() {
print('Dart infrastructure is available.');
print('Window location: `${web.window.location}`');
+
+ if (recipeRegex.hasMatch(web.window.location.pathname)) {
+ recipe();
+ return;
+ }
+
+ print('Frontend code is inactive for this path `${web.window.location.pathname}`.');
+}
+
+void recipe() {
+ print('Handling /recipe page.');
}