Browse Source

Add shell scripts for running serving three.js in javascript, python, ruby and perl

zz85 12 years ago
parent
commit
06dc5dd6c8

+ 4 - 0
utils/servers/javascript_server.sh

@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd `dirname $0`/../../
+node utils/servers/simplehttpserver.js

+ 5 - 0
utils/servers/perl_server.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd `dirname $0`/../../
+perl -MIO::All -e 'io(":8080")->fork->accept->(sub { $_[0] < io(-x $1 
++? "./$1 |" : $1) if /^GET \/(.*) / })'

+ 4 - 0
utils/servers/python_server.sh

@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd `dirname $0`/../../
+python -m SimpleHTTPServer

+ 1 - 0
utils/servers/readme.txt

@@ -0,0 +1 @@
+For more information about running files locally, visit https://github.com/mrdoob/three.js/wiki/How-to-run-things-locally

+ 4 - 0
utils/servers/ruby_server.sh

@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd `dirname $0`/../../
+ruby -r webrick -e "s = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start"