update readme, change config file suffix

This commit is contained in:
siddontang 2014-08-08 07:45:34 +08:00
parent 2ccef526b6
commit a4f2b358e0
2 changed files with 11 additions and 2 deletions

View File

@ -70,7 +70,7 @@ Choosing a store database to use is very simple, you have two ways:
+ Set in command flag
ledis-server -config=/etc/ledis.toml -db_name=leveldb
ledis-server -config=/etc/ledis.conf -db_name=leveldb
Flag command set will overwrite config set.
@ -78,12 +78,18 @@ Choosing a store database to use is very simple, you have two ways:
You must known that changing store database runtime is very dangerous, LedisDB will not guarantee the data validation if you do it.
## Configuration
LedisDB uses [toml](https://github.com/toml-lang/toml) as the preferred configuration format, also supports ```json``` because of some history reasons. The basic configuration ```./etc/ledis.conf``` in LedisDB source may help you.
If you don't use a configuration, LedisDB will use the default for you.
## Server Example
//set run environment if not
source dev.sh
ledis-server -config=/etc/ledis.toml
ledis-server -config=/etc/ledis.conf
//another shell
ledis-cli -p 6380

View File

@ -1,5 +1,7 @@
# LedisDB configuration
# Config format is toml, https://github.com/toml-lang/toml
# Server listen address
addr = "127.0.0.1:6380"
@ -36,6 +38,7 @@ max_open_files = 1024
map_size = 524288000
[binlog]
# Set either size or num to 0 to disable binlog
max_file_size = 0
max_file_num = 0