From 558230250657027888e242225896d9dffcf678fa Mon Sep 17 00:00:00 2001 From: Sebastian Sastre Date: Sat, 27 Jan 2024 07:55:09 -0300 Subject: [PATCH] Update tryOnTeapot.md --- tryOnTeapot.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tryOnTeapot.md b/tryOnTeapot.md index e968997..512a61a 100644 --- a/tryOnTeapot.md +++ b/tryOnTeapot.md @@ -6,7 +6,7 @@ Metacello new load. ``` -### Configure the server and setup routes +### Configure the server ```smalltalk "Configure Teapot defaults" teapot := Teapot configure: { @@ -22,7 +22,9 @@ teapot exception: Error -> [ :ex :req | | content | ifFalse: [ 'Internal error' ]. TeaResponse serverError body: content. ]. - +``` +### Setup routes +```smalltalk "Add a ping route" teapot GET: '/ping' -> 'pong'. @@ -41,4 +43,4 @@ teapot start. "Stop the HTTP server." teapot stop. -``` \ No newline at end of file +```