This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PORT = 8008; | |
interface APIInterface { | |
@safe: | |
string postMatches(); | |
string get(); | |
} | |
class APIHandlers : APIInterface { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-modules (web client) | |
(web response) | |
((rnrs) :version (6))) | |
(define port "8000") | |
(define body "{\"foo\": \"xyx\"}" ) | |
;; GOTCHAs | |
;; Body needs to be converted from string to utf8 and back again | |
;; Need to destructure response with let-values in order to get body string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// db.zig | |
const std = @import("std"); | |
const warn = std.debug.warn; | |
const Allocator = std.mem.Allocator; | |
const util = @import("../util.zig"); | |
const c = @cImport({ | |
@cInclude("lmdb.h"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require racket/trace) | |
(define (example) | |
(error a b c)) | |
(trace example) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require web-server/servlet-env | |
web-server/http | |
web-server/dispatchers/dispatch) |
NewerOlder