Created
May 26, 2013 17:49
-
-
Save dkvasnicka/5653494 to your computer and use it in GitHub Desktop.
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 https://github.com/dmacdougall/spin No buildfile needed or anything... Racket requires the library from disk or downloads it from the central repo (PLaneT) if needed. Übercool.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require (planet dmac/spin)) | |
(get "/hello/:name" (lambda (req) (string-append "Hello, " (params req 'name)))) | |
(run) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment