bak (owner)

Revisions

gist: 202768 Download_button fork
public
Public Clone URL: git://gist.github.com/202768.git
Embed All Files: show embed
Bash #
1
2
3
4
5
6
7
8
9
10
11
#
# Start a WEBrick server in the cwd (serves html, rhtml, assets)
#
# Usage:
# webrick_on
# webrick_on 8000
#
function webrick_on
{
  ruby -e "require 'webrick';include WEBrick;s = HTTPServer.new(:Port => ${@:-9090},:DocumentRoot => Dir::pwd);trap('INT'){s.shutdown};s.start"
}