Last active
December 14, 2015 08:09
-
-
Save manji6/5056073 to your computer and use it in GitHub Desktop.
rubyを使って簡易webサーバー構築
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 起動 | |
$ ruby -r webrick -e 'WEBrick::HTTPServer.new(:ServerName => "localhost", :DocumentRoot => "./", :Port => 8080, :MimeTypes => WEBrick::HTTPUtils::DefaultMimeTypes.merge({"js"=>"text/javascript"})).start' | |
# 停止 | |
$ ps aux | grep ruby | |
$ kill -9 <pid> | |
// reference doc is here! | |
// http://www.ruby-lang.org/ja/old-man/html/WEBrick_HTTPServer.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment