summaryrefslogtreecommitdiffstats
path: root/go/README
blob: 0434335aaba462d347e1f6c9436d519865aafe4b (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 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:`.