update readme
This commit is contained in:
parent
c7b8b6185a
commit
ba8d256143
1 changed files with 2 additions and 26 deletions
28
README.md
28
README.md
|
@ -1,28 +1,4 @@
|
|||
# Wisp Example: Routing
|
||||
# Ring
|
||||
|
||||
```sh
|
||||
gleam run # Run the server
|
||||
gleam test # Run the tests
|
||||
```
|
||||
A simple web ring
|
||||
|
||||
This example shows how to route requests to different handlers based on the
|
||||
request path and method.
|
||||
|
||||
This example is based off of the ["Hello, World!" example][hello], so read that
|
||||
one first. The additions are detailed here and commented in the code.
|
||||
|
||||
[hello]: https://github.com/lpil/wisp/tree/main/examples/00-hello-world
|
||||
|
||||
### `app/router` module
|
||||
|
||||
The `handle_request` function now pattern matches on the request and calls other
|
||||
request handler functions depending on where the request should go.
|
||||
|
||||
### `app_test` module
|
||||
|
||||
Tests have been added for each of the routes. The `wisp/testing` module is used
|
||||
to create different requests to test the application with.
|
||||
|
||||
### Other files
|
||||
|
||||
No changes have been made to the other files.
|
||||
|
|
Loading…
Reference in a new issue