summaryrefslogtreecommitdiffstats
path: root/go
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2014-01-06 01:42:04 +0100
committertv <tv@nomic.retiolum>2014-01-06 01:42:04 +0100
commitc7ab5042fef55b71baf6bb637cb6033b25007845 (patch)
tree88dc8068608c55c535d5ccb6e850f56eb9c5efbb /go
parent7023ea2453bde5a09ffd2555c4237443ad88b643 (diff)
go: talk about the redis key prefix
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