Skip to the content.

UrlShortener

GitHub top language GitHub language count PRs Welcome GitHub release GitHub Release Date GitHub license

Overview

UrlShortener is a quick, open-source project for shortening URL, you can easily host your own URL shortener service with it, similar to TinyURL.com and 百度短网址, plus basic statistics over the data.

Features

Quick Start

The minimum requirements to run the quick start are:

  1. Clone
    $ git clone https://github.com/rupertw/url-shortener.git
    $ cd url-shortener
    
  2. Modifiy application.properties, blacklist
    #默认8080端口
    #server.port=80
         
    #域名
    url.shortener.service.host=http://www.me
       
    #SnowFlake
    snowflake.datacenterId=1
    snowflake.machineId=1
       
    #Redis
    spring.redis.host=localhost
    spring.redis.port=6379
    spring.redis.password=todo
    spring.redis.database=1
    ...
    
    #xxx.com
    yyy.com
    
  3. Build an image from the Dockerfile
    $ mvn -DskipTests clean package -U
    $ mvn dockerfile:build
    
  4. Create a container layer over the new image, and then start it
    $ docker run -p 80:8080 rupertw/url-shortener:1.0.0.RELEASE
    
  5. Test the REST APIs
    http://127.0.0.1/swagger-ui.html
    

Documents

Releases

References

License

UrlShortener is released under the MIT License.