• Stars
    star
    12
  • Rank 1,547,396 (Top 32 %)
  • Language
    Racket
  • License
    Other
  • Created over 6 years ago
  • Updated over 6 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
67
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
53
star
3

internet-nextplorer

Gopher browser for ZX Spectrum Next
Assembly
42
star
4

Agon-MOS-Tools

Small utils for Agon Light.
Assembly
31
star
5

Agon-rokky

Dungeons and Diamonds game for Agon Light
Assembly
26
star
6

zx-net-tools

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

cpm-uno

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

Agon-MOS-SDCC-Template

Minimal SDCC template for creating MOS applications
Assembly
11
star
9

esxdos-scl2trd

Scl to Trd conversion tool for esxDOS
C
10
star
10

rocksnghosts

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

uGoph

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

cpm-fm

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

cerberus-w65c02s-basic

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

moon-rabbit

MSX2 UnApi compatible gopher browser
Assembly
6
star
15

picoSIC

Simple Internet Chat in PicoLisp
PicoLisp
5
star
16

moon-rabbit-zx

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

esxdos-scl2trd-dot

Dot command that's converts scl to trd
C
4
star
18

netman-zx

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

agon-music-track-compiler

Kind-of tracker for creating music for Agon Light/Agon Console 8
Assembly
4
star
20

Lain

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

Minstrel4th-rom-patch

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

rustan

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

midi-nmf

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

zxuno-irc

IRC client for ZX-Uno
C
3
star
25

karabas-pro-cpm

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

zxuno-wget

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

province

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

Ice81

ZX81 for iCESugar board
Verilog
2
star
29

emacs-config

Mine basic emacs config
Emacs Lisp
2
star
30

esp-binary-firmware

Assembly
2
star
31

plus3e-zcontroller

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

nihirash.github.io

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

spec-goph

ZX Spectrum with spectranet gopher client
Assembly
1
star
34

ReVerSE-U8

VHDL
1
star
35

nginx-fpm-docker

Mine dockerized nginx+fpm
1
star
36

blog-source

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

touhou-zero

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

spectrum-next-gopher-proxy

Go
1
star
39

loggy

Blog engine used for mine blog
Clojure
1
star
40

iwconfig

WiFi configuration utility for ZX-Uno
C
1
star
41

uzifi

ZiFi client port for ZX-Uno
Assembly
1
star
42

png-to-raw

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

MSX-UNAPI-specification

An enhancement of the MSX extended BIOS mechanism that provides a clean way to define new APIs
Assembly
1
star