source: subversion/applications/editors/potlatch2/resources/server.rb @ 25367

Last change on this file since 25367 was 23044, checked in by gravitystorm, 10 years ago

Right, no more missing icons while testing. Grrr.

File size: 570 bytes
Line 
1#!/usr/bin/ruby
2
3# A very simple script to use Potlatch2 locally
4# without having to install a rails_port.
5# Run this script on a console, then visit
6# http://yourmachinename:3333/potlatch2.html
7#
8# Note that for *very* stupid flash-player reasons
9# neither 127.0.0.1 nor any other IP nor localhost
10# will work. Add a hostname to your /etc/hosts if
11# needs be.
12
13require 'webrick'
14include WEBrick
15
16s=HTTPServer.new(:Port => 3333, :DocumentRoot => Dir.pwd, :MaxClients => 1000)
17
18# Handle signals.
19%w(INT TERM).each do |signal|
20  trap(signal) { s.shutdown }
21end
22
23s.start
Note: See TracBrowser for help on using the repository browser.