aboutsummaryrefslogtreecommitdiff
path: root/examples/tutorial02/polls/views.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorial02/polls/views.rs')
-rw-r--r--examples/tutorial02/polls/views.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/tutorial02/polls/views.rs b/examples/tutorial02/polls/views.rs
new file mode 100644
index 0000000..4859cec
--- /dev/null
+++ b/examples/tutorial02/polls/views.rs
@@ -0,0 +1,5 @@
+use tosin::http::{Reply, Response};
+
+pub fn index() -> Response {
+ "Hello, world. You're at the polls index.".into_response()
+}