class

Server

Inherits Reference < Object

Constructors

new(host : String = HOST, port : Int32 = PORT, store : Store = Store.new)
Source

Class methods

Instance methods

extension(path)
Source
init
Source
raw_file(path)
Source
reply_with_nothing(context)
Source
reply_with_resource(resource, context, path)
Source
translate_path(path)

Conversion matrix:

GET /compiled-html-filename-without-extension -> /raw/html/filename-without-extension GET /filename.js -> /raw/js/filename-without-extension GET /filename.css -> /raw/css/filename-without-extension

Source
valid_path?(path)

Allowing smth like:

GET /raw/html/filename-without-extension GET /raw/js/filename-without-extension GET /raw/css/filename-without-extension GET /raw/bin/filename-with-extension

Source