user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
blob 5554a012ba859fb88d180792230c548084b27784 836 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
#!/usr/bin/env ruby
# Sample configuration using WEBrick, mainly intended dev/testing
# for folks familiar with Ruby and not various Perl webserver
# deployment options.  For those familiar with Perl web servers,
# plackup(1) is recommended for development and public-inbox-httpd(1)
# is our production deployment server.
require 'webrick'
require 'logger'
options = {
  :BindAddress => '127.0.0.1',
  :Port => 8080,
  :Logger => Logger.new($stderr),
  :CGIPathEnv => ENV['PATH'], # need to run 'git' commands
  :AccessLog => [
    [ Logger.new($stdout), WEBrick::AccessLog::COMBINED_LOG_FORMAT ]
  ],
}
server = WEBrick::HTTPServer.new(options)
server.mount("/",
             WEBrick::HTTPServlet::CGIHandler,
            "/var/www/cgi-bin/public-inbox.cgi")
['INT', 'TERM'].each do |signal|
  trap(signal) {exit!(0)}
end
server.start

debug log:

solving 5554a012 ...
found 5554a012 in https://80x24.org/public-inbox.git

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).