Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)
```