Skip to content

Commit

Permalink
update dsl example[skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout authored Jul 2, 2020
1 parent eca6077 commit f0cb7ed
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,22 @@ app.route:

Full examples in: [tests/test_readme/example3.nim](tests/test_readme/example3.nim).

or
```nim
import std/with
with app:
get "/", home
post "/", home
get "/home", home
get "/home", home
get "/redirect", doRedirect
get "/login", login
post("/login", login, middlewares = debugRequestMiddleware())
get "/hello/{name}", helloName
```

Run **app.nim**. Now the server is running at localhost:8080.

### More examples
Expand Down

0 comments on commit f0cb7ed

Please sign in to comment.