Skip to content
Hannes Steffenhagen edited this page Jan 26, 2014 · 2 revisions

This is the documentation for the go-chatapp. The particulars for the [pull mode](Pull Mode) and [push mode](Push Mode) are discussed on their respective pages.

Installation

To compile this project, the go toolchain is required. It can be obtained here (if the operating system you're using has a preferred method of installation - e.g. pacman on Arch Linux - please check if it is available through that first).

Once go is available, the easiest method to get this is to run go get github.com/hanst99/go-chatapp which will clone this repository in your $GOPATH (requires git).

If you haven't already, you'll also have to install the websocket package (go get code.google.com/p/go.net/websocket).

Running

You can compile the program by running go build while your working directory is the root directory of this package. You can also run the program without compiling it first by running go run chatapp.go <params...> in the root directory of this package. The compiled executable may be moved, but the public/ and views/ directories must be in the working directory when running it.

Parameters

You can pass the --help parameter to get an explanation of the parameters.

  • --mode <mode> set mode. Default: pull
  • --port <port> set port. This parameter must be passed!
Clone this wiki locally