]>
Lady’s Gitweb - Vocab/blob - scripts/serve.rb
2 # SPDX-FileCopyrightText: 2025 Lady <https://www.ladys.computer/about/#lady>
3 # SPDX-License-Identifier: CC0-1.0
7 server
= WEBrick
::HTTPServer.new(Port
: ARGV[0] || 3000, DocumentRoot
: "public", DirectoryIndex
: ["index.xhtml"])
8 trap
'INT' do server
.shutdown
end
10 class XHTMLHandler
< WEBrick
::HTTPServlet::DefaultFileHandler
11 def do_GET request
, response
13 response
['Content-Type'] = 'application/xhtml+xml
'
16 WEBrick::HTTPServlet::FileHandler.add_handler("xhtml", XHTMLHandler)
This page took 0.393595 seconds and 5 git commands to generate.