summaryrefslogtreecommitdiffstats
path: root/go/README
blob: 78f6b1952634ab772ed5492ee9e438a7424ab668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
go - minimalistic uri shortener

# installation
    npm install

  optionally
    npm install hiredis

# run service
    PORT=1337 node .

# add uri
    curl -F uri=https://mywaytoolonguri http://localhost:1337

  this will give you a relative shortened uri.

# resolve uri

  curl -L http://localhost:1337/shortened-relative-uri

# clear database

    redis-cli keys 'go:*' | xargs redis-cli del

  if you have changed `redisPrefix`, then use that instead of `go:`.