https://github.com/guenchi/catapult
a Web framework for Igropyr (Chez Scheme http-server)
https://github.com/guenchi/catapult
chez chez-scheme igropyr library scheme web webframework
Last synced: 6 months ago
JSON representation
a Web framework for Igropyr (Chez Scheme http-server)
- Host: GitHub
- URL: https://github.com/guenchi/catapult
- Owner: guenchi
- License: mit
- Created: 2018-02-28T19:00:11.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-02-09T11:43:41.000Z (12 months ago)
- Last Synced: 2025-02-09T12:27:05.169Z (12 months ago)
- Topics: chez, chez-scheme, igropyr, library, scheme, web, webframework
- Language: Scheme
- Homepage:
- Size: 193 KB
- Stars: 34
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Catapult
***Catapult*** is a web framework for ***Igropyr***
## [Manual](https://guenchi.github.io/Catapult)
***easy to write the router***
```
(req
("/" index)
("/index" index)
("/users" users)
("/notes" notes)
("/blog/*/en" blogEN)
("/articles/*" article)
("/*" handle404))
```
***easy to define responses***
```
(define index
(lambda (header path query)
(res "hello world")))
(define index
(lambda (header path query)
(res 200 "hello world")))
(define index
(lambda (header path query)
(res "text/html" "
hello world
")))
(define index
(lambda (header path query)
(res 200 "text/html" "hello world
")))
```
```
(res string) => response content only
(res int string) => response status and content
(res string string) => response style and content
(res int string string) => response status, style and content
```
***[Igropyr](https://guenchi.github.io/Igropyr)*** is an async http-server for Chez Scheme
Catapult's sister framework: ***[Ballista](https://guenchi.github.io/Ballista/)*** (Express-style)