Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/z-song/raf
a simple web application framework implements by racket
https://github.com/z-song/raf
Last synced: 30 days ago
JSON representation
a simple web application framework implements by racket
- Host: GitHub
- URL: https://github.com/z-song/raf
- Owner: z-song
- Created: 2014-05-09T01:45:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-01T01:20:42.000Z (over 10 years ago)
- Last Synced: 2024-10-20T18:30:42.622Z (2 months ago)
- Language: Racket
- Size: 156 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
raf
===A simple REST Application Framework implements by [Racket](racket-lang.org)
####Usage
```racket
#lang racket(require "main.rkt")
(app/get "/"
(lambda (req) "hello world"))(app/get "post/:id/:name"
(lambda (req)
(let* ([id (param 'id)] [name (param 'name)])
(cond
[(not (string? id)) (set! id "")])
(string-append "id is" id " and name is " name))))(app/listen 80)
(app/run)
```