Skip to content

Commit 7855171

Browse files
committedApr 29, 2024
Add section in README about config file & cmd line
Fixes #247.
1 parent 4b66bcf commit 7855171

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed
 

‎README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ $ curl -d "GET/hello" http://127.0.0.1:7379/
2626
→ {"GET":"world"}
2727
```
2828

29+
## Configuration
30+
31+
Webdis is configured by a configuration file in JSON format, provided to the server as a command-line parameter:
32+
```sh
33+
./webdis /path/to/webdis.json
34+
```
35+
36+
At start-up, Webdis will look for a file named `webdis.json` in the current directory if no file is specified on the command line.
37+
38+
This repository comes with a sample configuration file named `webdis.json`, to be used for local evaluation. Another file, `webdis.prod.json`, is provided as a starting point to build a production configuration file. Do **not** use either of these files in production without reviewing them.
39+
40+
The various features of Webdis are documented in this README.
41+
2942
# Try in Docker
3043

3144
```sh
@@ -232,8 +245,8 @@ Follow this table to diagnose issues with SSL connections to Redis.
232245
* Cross-origin requests, usable with XMLHttpRequest2 (Cross-Origin Resource Sharing - CORS).
233246
* [File upload](#file-upload) with `PUT`.
234247
* With the JSON output, the return value of INFO is parsed and transformed into an object.
235-
* Optionally run as a daemon process: set `"daemonize": true` and `"pidfile": "/var/run/webdis.pid"` in webdis.json.
236-
* Default root object: Add `"default_root": "/GET/index.html"` in webdis.json to substitute the request to `/` with a Redis request.
248+
* Optionally run as a daemon process: set `"daemonize": true` and `"pidfile": "/var/run/webdis.pid"` in `webdis.json`.
249+
* Default root object: Add `"default_root": "/GET/index.html"` in `webdis.json` to substitute the request to `/` with a Redis request.
237250
* HTTP request limit with `http_max_request_size` (in bytes, set to 128 MB by default).
238251
* Database selection in the URL, using e.g. `/7/GET/key` to run the command on DB 7.
239252

0 commit comments

Comments
 (0)