Skip to content

keveri/shorty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shorty

Build Status

Rusty URL Shortener

Setup

nightly is required for rocket library's features

rustup update
rustup override set nightly

Build & Run

Build:

cargo build

Run tests:

cargo test

Run with docker:

docker-compose up

Run on host:

# install and start redis locally
REDIS_HOST=localhost cargo run

Try it out

Create new short url ID:

$ curl --data "url=https://www.rust-lang.org" http://localhost:8000/
egYb

Lookup a short ID:

$ curl -I http://localhost:8000/egYb
HTTP/1.1 308 Permanent Redirect
Location: https://www.rust-lang.org
Server: Rocket
Content-Length: 0
Date: Tue, 03 Apr 2018 21:15:35 GMT

About

Rusty URL Shortener

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages