Skip to content

kakugirai/moetify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/.

About

A minimal URL shortening service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published