[racket] Simple json web response
When you say hangs do you mean it freezes? When I run the same code from
DrRacket, it runs fine. (Sometimes there's a small delay.)
When I view the source of the webpage I get some HTML, so I don't think you
want to use' response/xexpr' for JSON.
On Tue, Jul 29, 2014 at 1:28 PM, Eric Gustavson <gustavson.eric at gmail.com>
wrote:
> I'm new to racket -- so don't assume I know what I am doing. I tried
> running this code, and the web server just hangs. I am just trying to
> get a racket server to return a static json file. Any tips on how to
> get started would be appreciated.
>
> #lang web-server/insta
>
> (define (start request)
> (response/xexpr #:mime-type #"application/json"
> "{1: 11}"))
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140729/c87488d8/attachment.html>