Skip to content
/ reser Public

CHICKEN Scheme egg - HTTP-server library for full control of the stack

Notifications You must be signed in to change notification settings

Adellica/reser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What

A CHICKEN egg for creating HTTP-servers. Inspired by Clojure's ring.

Dependencies

Example

Run csi -s example.scm and try it:

$ curl localhost:8080/
root
$ curl localhost:8080/echo
no matching uri for (GET echo)
$ curl localhost:8080/echo -d 'hi'
hi
$ curl localhost:8080/bad
no matching uri for (GET bad)

If you edit the example to use nrepl, so you can also do:

echo '(define (app r) (response body: "you have been hacked"))' | nc localhost 1234

Which yields:

curl localhost:8090/anything -d "POST to root"
you have been hacked

This is very useful because it let's you redefine your server's behaviour and REST-APIs while it's running.

TODO

  • make a json wrapper to show how easy life can be
  • support better logging
  • unwrap uri-path in request map?
  • user-code must (use matchable) because of our syntax, I think. this is bad

About

CHICKEN Scheme egg - HTTP-server library for full control of the stack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages