moetify

command module
v0.0.0-...-31d6f92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2019 License: MIT Imports: 2 Imported by: 0

README

moetify

Actions Status Go Report Card

A minimal URL shortening service.

Build moetify locally

docker build -t moetify:latest .

Deploy on Kubernetes

Deploy redis and moetify.

kubectl apply -f k8s/redis-deployment.yml
kubectl apply -f k8s/moetify-deployment.yml

Create a redis service.

kubectl apply -f redis-service.yml

Create a moetify service of type LoadBalancer.

kubectl expose deployment moetify-app --name moetify-lb-service \
    --type LoadBalancer --port 80 --target-port 8080

API

Create a tiny url.

curl -X POST http://moetify.vim.moe/api/shorten -d '{
    "url": "http://example.com/",
    "expiration_in_minutes": 5
}'

Get more tiny url information.

curl -X GET 'http://moetify.vim.moe/api/info?shortlink=B22ul6TZwiRl'

http://moetify.vim.moe/B33spMi94CO4 will be redirected to http://example.com/.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL