diff --git a/RUNNING.md b/RUNNING.md index 15d8d84..f822f9e 100644 --- a/RUNNING.md +++ b/RUNNING.md @@ -12,7 +12,10 @@ Copy `example_config.json` to a file with any name you like (e.g. `config.json`), then open the copied file and edit the parameters to your -liking (they should be self-explanatory, especially with comments). +liking. Here's a list of what they are: +- `bind_host` (string): What address to bind to +- `bind_port` (zero or positive integer): What port to bind to +- `image_proxy_url` (string): URL to proxy images to (see https://pixiv.cat/reverseproxy.html), a trailing slash is not needed Pixwhile is intended to be run behind a reverse proxy (e.g. Nginx), so you should set your reverse proxy to proxy requests to diff --git a/config.cpp b/config.cpp index adc0838..c136e33 100644 --- a/config.cpp +++ b/config.cpp @@ -5,7 +5,7 @@ Config load_config(const char* path) { File config_file(path, "r"); - return nlohmann::json::parse(config_file.get(), nullptr, true, true); + return nlohmann::json::parse(config_file.get()); } void from_json(const nlohmann::json& j, Config& config) { diff --git a/example_config.json b/example_config.json index 39f4d5c..6bf1cd8 100644 --- a/example_config.json +++ b/example_config.json @@ -1,5 +1,5 @@ { - "bind_host": "127.0.0.1", // string: What address to bind to - "bind_port": 8080, // integer: What port to bind to - "image_proxy_url": "https://i.pixiv.cat" // string: URL to proxy images to (see https://pixiv.cat/reverseproxy.html), a trailing slash is not needed + "bind_host": "127.0.0.1", + "bind_port": 8080, + "image_proxy_url": "https://i.pixiv.cat" }