From c7ab5042fef55b71baf6bb637cb6033b25007845 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 6 Jan 2014 01:42:04 +0100 Subject: go: talk about the redis key prefix --- go/README.markdown | 5 +++++ go/etc/conf.d/go.env | 1 + go/index.js | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'go') diff --git a/go/README.markdown b/go/README.markdown index 56378151..87e0541e 100644 --- a/go/README.markdown +++ b/go/README.markdown @@ -18,6 +18,11 @@ if you omit `PORT`, then it's `1337`. if you omit `URI_PREFIX`, then it will be generated from `HOSTN` änd `PORT`. + there's also the possibility to change the Redis key prefix which + defaults to `go:` with + + REDIS_KEY_PREFIX=foobarmyprefix/ + ## add uri curl -F uri=https://mywaytoolonguri http://go diff --git a/go/etc/conf.d/go.env b/go/etc/conf.d/go.env index 1b8c980b..477c7eeb 100644 --- a/go/etc/conf.d/go.env +++ b/go/etc/conf.d/go.env @@ -1,3 +1,4 @@ HOSTN=go PORT=1337 URI_PREFIX=http://go +REDIS_KEY_PREFIX=go: diff --git a/go/index.js b/go/index.js index 44ff79b5..7f1e6a07 100644 --- a/go/index.js +++ b/go/index.js @@ -2,7 +2,7 @@ var hostname = process.env.HOSTN; var httpPort = process.env.PORT; var uriPrefix = process.env.URI_PREFIX; -var redisPrefix = 'go:'; +var redisPrefix = process.env.REDIS_KEY_PREFIX; // automatic configuration @@ -18,6 +18,9 @@ if (!uriPrefix) { } } } +if (!redisPrefix) { + redisPrefix = 'go:'; +} // load libraries -- cgit v1.2.3