summaryrefslogtreecommitdiffstats
path: root/go/README
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2014-01-05 23:31:03 +0100
committertv <tv@nomic.retiolum>2014-01-05 23:31:03 +0100
commit4464409743a08903859340053bff58bd94df0ffd (patch)
treea64ea2e6b4a105ac6f2a0ac7f2bc947d7df01fff /go/README
parent1cbf273c3b74c070ebd7e65c50223f276daa26ca (diff)
go: setenv HOSTN to generate absolute uris
Diffstat (limited to 'go/README')
-rw-r--r--go/README10
1 files changed, 6 insertions, 4 deletions
diff --git a/go/README b/go/README
index 78f6b195..17deb7d6 100644
--- a/go/README
+++ b/go/README
@@ -7,16 +7,18 @@ go - minimalistic uri shortener
npm install hiredis
# run service
- PORT=1337 node .
+ HOSTN=go PORT=80 node .
+
+ if you omit `HOSTN`, then relative shortened uris will be generated.
# add uri
- curl -F uri=https://mywaytoolonguri http://localhost:1337
+ curl -F uri=https://mywaytoolonguri http://go
- this will give you a relative shortened uri.
+ this will give you a shortened uri.
# resolve uri
- curl -L http://localhost:1337/shortened-relative-uri
+ curl -L http://go/1
# clear database