Ze-Chat using Websockets and GO!

I decided to do something, well different. So I ended up with this redistributable online chat based on Websockets.

The client is of course just HTML and Javascript but I decided to try and write the server software using GO

The result is a basic but totaly redistributable chat, you don’t even need to have a webserver installed. Just compile and go!

The server is initially set to listen to port 8181 as you can see above, just browse to http://localhost:8181 using any browser supporting Websockets (like Chrome and Firefox 4 Beta)

If you wanna try this you can download the zipped source below, you will need to have Go installed for either Linux or Windows depending on what you are.. running, duh

Just download the source and unzip, if you are using GNU/Linux you can build and start the server using either the build or buildx64 scripts.

Windows:

  1. Download and unzip http://code.google.com/p/gomingw/downloads/list to e.g C:/Tools/go
  2. Add C:/Tools/go/bin to your PATH
  3. Add new Environment Variable GOROOT and set it to C:/Tools/go/
  4. Add new Environment Variable GOBIN and set it to C:/Tools/go/bin
  5. Download the ze-chat source and unzip it somewhere
  6. open a new command prompt and navigate to that directory
  7. type and execute ’8g server.go’
  8. type and execute ’8l -o server.exe server.8′
  9. type and execute ‘server.exe 8181′ , replace 8181 with any other port you would like
  10. done, use either Chrome or Firefox 4 Beta, open a tab/window, type in the address “http://localhost:8181″

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>