Examples

Hello, routes

About

quillo run hello.qwe then: curl localhost:8080/add/2/40

Run it

$ quillo run hello.qwe --watch

Source

hello.qwe
route GET / = <h1>Hello from Quillo</h1>// Path parameters are variables. `:a(int)` only matches digits and gives an int.route GET /hello/:name = `Hello, ${name}!`route GET /add/:a(int)/:b(int) = { sum: a + b }// Query parameters are a pattern: typed, with defaults.route GET /search ? { q: str, limit: int = 10 } = {    query: q,    limit,    results: range(limit) | map((i) => `${q} #${i + 1}`),}

See hello.qwe on GitHub

Thread
12Useful? Like it, or add to its thread below.

Thread 0 posts

On Hello, routes: questions, tips, corrections, and code that uses it.

No posts yet. The first one opens the thread.