Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Primitive RESTful hello world in Racket. Run racket (racket -il xrepl) and load the file (,rr app.rkt). Browse to http://localhost:8000/hello/whatever Uses Spin No buildfile needed or anything... Racket requires the library from disk or downloads it from the central repo (PLaneT) if needed. Übercool.
#lang racket
(require (planet dmac/spin))
(get "/hello/:name" (lambda (req) (string-append "Hello, " (params req 'name))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment