Skip to content
/ koi Public

A toy web framework for Carp

Notifications You must be signed in to change notification settings

TimDeve/koi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koi

A toy web framework for Carp

Warning

This is very much a proof of concept please don't use this for anything serious.

Examples

(load "https://github.com/TimDeve/koi@v0.2.2")

(use Koi)

(defn root-handler [req]
  (Res.send (HttpStatus.Ok)
            @"text/plain"
            @"Hello from Carp!"))

(defn routes []
  [(Route.init (HttpVerb.GET) @"/" root-handler)])

(defn main []
  (serve "localhost" 8080 (routes)))
make run-form-example
make run-json-api-example