• Stars
    star
    12
  • Rank 1,597,372 (Top 32 %)
  • Language
    Racket
  • License
    Other
  • Created about 7 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

HoLy is simple http library for Racket language

HoLy

What is it?

HoLy is simple a HTTP-server Library for Racket.

Sorry, library in alpha stage! Be carefull API is unstable!

Pull requests are welcome!

We'll make web fucntional again!

Installation

You can install it with using console utillity raco:

raco pkg install https://github.com/nihirash/holy.git

Or with using DrRacket IDE.

Usage

#lang racket
(require HoLy)

(http/get "/"
    (λ (req) "Welcome"))

(http/get "/article/:id"
    (λ (req)
	(let* ((id (request/param 'id)))
	    (string-append "This is article #" id))))

(server/set-port 8080)

(server/run)

API

http/get, http/post, http/delete, http/put

Defines request handler for specified request type.

Parameters are url as string(with possibility usage of placeholders) and callback function.

Example:

(http/get "/article/:id"
    (λ (req)
	(let* ((id (request/param 'id)))
	    (string-append "This is article #" id))))

request/param

Gets request parameter's value(from get/post or placeholder parameter).

Parameter is name of parameter.

request/cookie

Gets cookie value.

Parameter is name of cookie.

response/make

Creates response. It have required parameter content and several rest parameters.

Default values are:

#:code [code 200]
#:message [message #"OK"]
#:seconds [seconds (current-seconds)]
#:mime-type [mime-type TEXT/HTML-MIME-TYPE]
#:headers [headers (list (make-header #"Cache-Control" #"no-cache"))]

Can be used for creating custom response statuses/placing new headers etc.

response/404

Response with 404 status.

server/set-port

Defines port that's be listened with http server

server/run

Run's server event loop

Credits

  • z-song is author Raf framework(HoLy is created by reading Raf sources).

  • nihirash is author and maintainer of HoLy library

More Repositories

1

ells

Embeddable Lisp-Like Scripting
Scala
68
star
2

Agon-CPM2.2

CP/M 2.2 port for Agon Light that didn't require custom firmware. Use your Agon fully and have access to CP/M system.
AGS Script
58
star
3

internet-nextplorer

Gopher browser for ZX Spectrum Next
Assembly
45
star
4

Agon-MOS-Tools

Small utils for Agon Light.
Assembly
31
star
5

Agon-rokky

Dungeons and Diamonds game for Agon Light
Assembly
27
star
6

zx-net-tools

Net tools for any 128K+ spectrum with ESP-12 connected to AY-chip.
Assembly
25
star
7

cpm-uno

CP/M with +3DOS volumes made for ZXUno
Assembly
16
star
8

Agon-MOS-SDCC-Template

Minimal SDCC template for creating MOS applications
Assembly
12
star
9

esxdos-scl2trd

Scl to Trd conversion tool for esxDOS
C
10
star
10

ZINC

ZINC is Not CP/M
Assembly
10
star
11

cpm-fm

CP/M Visual File Manager. Working even on i8080/i8085. Made with BDS C
C
9
star
12

rocksnghosts

Small Rocks'n'Diamonds-like game for Jupiter Ace computer
Assembly
7
star
13

uGoph

Gopher browser for ZX-Uno(FPGA ZX-Spectrum clone)
Assembly
6
star
14

cerberus-w65c02s-basic

W65C02S Basic for Cerberus computer. Based on Microsoft Basic.
Assembly
6
star
15

moon-rabbit

MSX2 UnApi compatible gopher browser
Assembly
6
star
16

esxdos-scl2trd-dot

Dot command that's converts scl to trd
C
5
star
17

picoSIC

Simple Internet Chat in PicoLisp
PicoLisp
5
star
18

agon-music-track-compiler

Kind-of tracker for creating music for Agon Light/Agon Console 8
Assembly
5
star
19

moon-rabbit-zx

Moon Rabbit gopher browser adopted for ZX Spectrum-compatible computers
Assembly
5
star
20

netman-zx

ZX Spectrum WiFi network manager(new)
Assembly
4
star
21

Lain

Loading memory images to ZX Spectrum via Network
Assembly
3
star
22

Minstrel4th-rom-patch

Adding RC2014's UART support to Minstrel 4th computer
Assembly
3
star
23

rustan

Spartan server(like gemini but without TLS) written in Rust.
Rust
3
star
24

midi-nmf

Midi format oriented for usage with ZX Spectrum
Assembly
3
star
25

zxuno-irc

IRC client for ZX-Uno
C
3
star
26

karabas-pro-cpm

CP/M 2.2 Port to Karabas Pro computer
Makefile
3
star
27

esp-binary-firmware

Assembly
3
star
28

plus3e-zcontroller

zx spectrum plus 3e rom hack to support z-controller
Assembly
3
star
29

zxuno-wget

Utility that makes HTTP-request and store response to file
Assembly
3
star
30

province

Web "framework" written in Chicken Scheme
Scheme
3
star
31

Ice81

ZX81 for iCESugar board
Verilog
2
star
32

emacs-config

Mine basic emacs config
Emacs Lisp
2
star
33

AgonImageFormat

Image format, converter and loader/viewer for Agon Light
Assembly
2
star
34

nihirash.github.io

Мой личный блог
HTML
2
star
35

spec-goph

ZX Spectrum with spectranet gopher client
Assembly
1
star
36

ReVerSE-U8

VHDL
1
star
37

nginx-fpm-docker

Mine dockerized nginx+fpm
1
star
38

touhou-zero

ZX Enhanced(TSConf) touhou-styled game.
C
1
star
39

agon-snail

Snail gopher browser
Assembly
1
star
40

spectrum-next-gopher-proxy

Go
1
star
41

blog-source

исходники(не компилированная версия) блога
HTML
1
star
42

loggy

Blog engine used for mine blog
Clojure
1
star
43

iwconfig

WiFi configuration utility for ZX-Uno
C
1
star
44

uzifi

ZiFi client port for ZX-Uno
Assembly
1
star
45

png-to-raw

PNG to Raw images converter(big endian)
C
1
star