From 3471c5dab8ac2c2e52cc1daa0684b222196717e4 Mon Sep 17 00:00:00 2001 From: Umputun Date: Sun, 27 Jan 2019 16:21:05 -0600 Subject: [PATCH] add missing params to readme --- README.md | 19 ++++++++++--------- backend/app/cmd/server_test.go | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ed528b89..aedd4625 100644 --- a/README.md +++ b/README.md @@ -104,9 +104,9 @@ _this is the recommended way to run remark42_ | avatar.type | AVATAR_TYPE | `fs` | type of avatar storage, `fs`, 'bolt`, or `mongo` | | avatar.fs.path | AVATAR_FS_PATH | `./var/avatars` | avatars location for `fs` store | | avatar.bolt.file | AVATAR_BOLT_FILE | `./var/avatars.db` | file name for `bolt` store | -| avatar.rsz-lmt | AVATAR_RSZ_LMT | 0 | max image size for resizing avatars on save | -| auth.ttl.jwt | AUTH_TTL_JWT | 5m | jwt TTL | -| auth.ttl.cookie | AUTH_TTL_COOKIE | 200h | cookie TTL | +| avatar.rsz-lmt | AVATAR_RSZ_LMT | `0` (disabled) | max image size for resizing avatars on save | +| auth.ttl.jwt | AUTH_TTL_JWT | `5m` | jwt TTL | +| auth.ttl.cookie | AUTH_TTL_COOKIE | `200h` | cookie TTL | | auth.google.cid | AUTH_GOOGLE_CID | | Google OAuth client ID | | auth.google.csec | AUTH_GOOGLE_CSEC | | Google OAuth client secret | | auth.facebook.cid | AUTH_FACEBOOK_CID | | Facebook OAuth client ID | @@ -115,28 +115,29 @@ _this is the recommended way to run remark42_ | auth.github.csec | AUTH_GITHUB_CSEC | | Github OAuth client secret | | auth.yandex.cid | AUTH_YANDEX_CID | | Yandex OAuth client ID | | auth.yandex.csec | AUTH_YANDEX_CSEC | | Yandex OAuth client secret | -| auth.dev | AUTH_DEV | false | local oauth2 server, development mode only | +| auth.dev | AUTH_DEV | `false` | local oauth2 server, development mode only | | notify.type | NOTIFY_TYPE | none | type of notification (none or telegram) | -| notify.queue | NOTIFY_QUEUE | 100 | size of notification queue | +| notify.queue | NOTIFY_QUEUE | `100` | size of notification queue | | notify.telegram.token | NOTIFY_TELEGRAM_TOKEN | | telegram token | | notify.telegram.chan | NOTIFY_TELEGRAM_CHAN | | telegram channel | -| notify.telegram.timeout | NOTIFY_TELEGRAM_TIMEOUT | | telegram timeout | +| notify.telegram.timeout | NOTIFY_TELEGRAM_TIMEOUT | `5s` | telegram timeout | | ssl.type | SSL_TYPE | none | `none`-http, `static`-https, `auto`-https + le | -| ssl.port | SSL_PORT | 8443 | port for https server | +| ssl.port | SSL_PORT | `8443` | port for https server | | ssl.cert | SSL_CERT | | path to cert.pem file | | ssl.key | SSL_KEY | | path to key.pem file | | ssl.acme-location | SSL_ACME_LOCATION | `./var/acme` | dir where obtained le-certs will be stored | | ssl.acme-email | SSL_ACME_EMAIL | | admin email for receiving notifications from LE | -| max-comment | MAX_COMMENT_SIZE | 2048 | comment's size limit | +| max-comment | MAX_COMMENT_SIZE | `2048` | comment's size limit | | max-votes | MAX_VOTES | `-1` | votes limit per comment, `-1` - unlimited | | low-score | LOW_SCORE | `-5` | low score threshold | +| positive-score | POSITIVE_SCORE | `false` | enable positive score only | | critical-score | CRITICAL_SCORE | `-10` | critical score threshold | | restricted-words | RESTRICTED_WORDS | | words banned in comments (can use `*`), _multi_ | | edit-time | EDIT_TIME | `5m` | edit window | | read-age | READONLY_AGE | | read-only age of comments, days | | img-proxy | IMG_PROXY | `false` | enable http->https proxy for images | | update-limit | UPDATE_LIMIT | `0.5` | updates/sec limit | -| admin-passwd | ADMIN_PASSWD | | password for `admin` basic auth | +| admin-passwd | ADMIN_PASSWD | none (disabled) | password for `admin` basic auth | | dbg | DEBUG | `false` | debug mode | * command line parameters are long form `--=value`, i.e. `--site=https://demo.remark42.com` diff --git a/backend/app/cmd/server_test.go b/backend/app/cmd/server_test.go index b99d4cd2..4140693b 100644 --- a/backend/app/cmd/server_test.go +++ b/backend/app/cmd/server_test.go @@ -109,8 +109,8 @@ func TestServerApp_WithMongo(t *testing.T) { require.Nil(t, err) defer func() { - s, err := mongo.NewServerWithURL(mongoURL, 10*time.Second) - assert.NoError(t, err) + s, e := mongo.NewServerWithURL(mongoURL, 10*time.Second) + assert.NoError(t, e) conn := mongo.NewConnection(s, "test_remark", "") _ = conn.WithDB(func(dbase *mgo.Database) error { assert.NoError(t, dbase.DropDatabase())