Merge pull request #26 from b0unce/example-config

Add example configuration and update README
This commit is contained in:
Justin Li 2013-12-10 10:40:33 -08:00
commit 0ceefca9c1
2 changed files with 26 additions and 1 deletions

View file

@ -38,7 +38,7 @@ $ go get github.com/chihaya/chihaya
Configuration is done in a JSON formatted file specified with the `-config`
flag. An example configuration file can be found
[here](https://github.com/chihaya/chihaya/blob/master/config/example.json).
[here](https://github.com/chihaya/chihaya/blob/master/example.json).
### Running the tests

25
example.json Normal file
View file

@ -0,0 +1,25 @@
{
"network": "tcp",
"addr": ":34000",
"tracker": {
"driver": "redis",
"network": "tcp",
"host": "127.0.0.1",
"port": "6379",
"user": "root",
"pass": "",
"prefix": "test:",
"max_idle_conns": 3,
"idle_timeout": "240s"
},
"private": true,
"freeleech": false,
"announce": "30m",
"min_announce": "15m",
"read_timeout": "20s",
"default_num_want": 50
}