Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Updated go version to serve static assets

Also moved static assets up a directory
  • Loading branch information...
commit f8b18db1dd6c7bc344cfdc4afc1336f6c4649ced 1 parent 1df5156
@mikelikespie mikelikespie authored
12 README.rst
@@ -16,7 +16,7 @@ It should work on OS X too. There are no UIKit dependencies.
.. Warning::
This is not production-quality software yet. It has only been used in
- development environments.
+ devlopment environments.
@@ -42,7 +42,7 @@ There's a few options. Choose one, or just figure it out
- You can copy all the files in the SocketRocket group into your app.
- Include SocketRocket as a subproject and use libSocketRocket
- If you do this, you must add ``-ObjC`` to your "other linker flags" option
+ If you do this, you must add -ObjC to your "other linker flags" option
- For OS X you will have to repackage make a .framework target. I will take
contributions. Message me if you are interested.
@@ -173,6 +173,11 @@ In the same terminal session, start the chatroom server::
python TestChatServer/py/
+There's also a Go implementation (with the latest weekly) where you can::
+ cd TestChatServer/go
+ go run chatroom.go
Now, start (just run the target in the XCode project). If you had
@@ -205,8 +210,7 @@ Autobahn/twisted.
As far as Go's goes, it works in my limited testing. I much prefer go's
concurrency model as well. Try it! You may like it.
-(``brew install --use-git --devel --HEAD go`` seems to give me a reasonable
-version). It could use some more control over things such as pings, etc., but I
+It could use some more control over things such as pings, etc., but I
am sure it will come in time.
2  TestChatServer/go/chatroom.go
@@ -49,6 +49,8 @@ func main() {
msg := make(chan Msg)
http.Handle("/chat", websocket.Handler(newChatServer(reg, unreg, msg)))
+ http.Handle("/", http.FileServer(http.Dir("../static")))
go run(reg, unreg, msg)
err := http.ListenAndServe(":9000", nil)
2  TestChatServer/py/
@@ -19,7 +19,7 @@
def parse_args():
global args
- static_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'static'))
+ static_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'static'))
parser = argparse.ArgumentParser(description='Gateway server')
parser.add_argument('-v', '--verbose', help='verbose logging', action='store_true')
0  TestChatServer/py/static/.gitignore → TestChatServer/static/.gitignore
File renamed without changes
0  TestChatServer/py/static/index.html → TestChatServer/static/index.html
File renamed without changes
0  TestChatServer/py/static/proxy.js → TestChatServer/static/proxy.js
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.