Skip to content
Browse files

Linux support

  • Loading branch information...
1 parent 3b2fa77 commit b9b8779da5df5fb320e1899661720e6ad2271c79 @ebidel ebidel committed May 14, 2012
Showing with 22 additions and 1 deletion.
  1. +22 −1 readme.md
View
23 readme.md
@@ -11,6 +11,27 @@ Oh. That's it.
## Running
+Here's a small shell script that you can save as `server.sh` which opens and servers the current directory on the port specified:
+
+```shell
+ port=$1
+ if [ $# -ne 1 ]
+ then
+ port=8000
+ fi
+
+ if [ $(uname -s) == "Darwin" ]
+ then
+ open=open
+ else
+ open=xdg-open
+ fi
+
+ $open http://localhost:$port && python -m SimpleHTTPServer $port;
+```
+
+For example, run this guy as:
+
```shell
- open http://localhost:8000 && python -m SimpleHTTPServer
+ ./server.sh 8000
```

0 comments on commit b9b8779

Please sign in to comment.
Something went wrong with that request. Please try again.