summaryrefslogtreecommitdiffstats
path: root/go
diff options
context:
space:
mode:
Diffstat (limited to 'go')
-rw-r--r--go/README.markdown5
-rw-r--r--go/etc/conf.d/go.env1
-rw-r--r--go/index.js5
3 files changed, 10 insertions, 1 deletions
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