On 2015-12-27 23:56, 机械唯物主义 : linjunhalida wrote:
> (get "/" (lambda (request)  "hello")
> (get "/from/:id" (lambda (request) (sprintf "hello ~A" (request 'id))))
> (get "/page/:id" (lambda (request)
>   (let ((data ($query (from pages) (where (= id (request 'id))))))
>     (render "templates/page" ('data data))))

Awful is somewhat similar to Sinatra, and basically does what you're
describing, so I'd suggest having another look at it. It's worked for me
in the past, anyway.

Or, as others have mentioned, you can use Spiffy directly, hand-roll a
`render` method, and maybe use some helper eggs for things like routing:

http://api.call-cc.org/doc/spiffy-request-vars
http://api.call-cc.org/doc/spiffy-uri-match

Cheers,

Evan

_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to