Skip to content

A fast in-memory URL shortener made in Rust as a personal challenge

Notifications You must be signed in to change notification settings

Warkanlock/rustener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rustener

A fast url shortener made in Rust in less than 100 lines.

A lot of this code is just to play with Rust as a tool and see what it is capable of. I did this to understand how things like Mutex<> and asynchronous references worked. I also tried to do this to put Rocket into practice as my main web framework for web development in Rust.

How to use it

Statistics (count of urls and version)

curl --request GET --url http://127.0.0.1:8000/

Create a short url

curl --request GET \
  --url http://127.0.0.1:8000/new \
  --header 'Content-Type: application/json' \
  --data '{
	"url": "www.yourwebpage.com",
	"creator": "warkanlock"
}'

Visualize data from an identifier

curl --request GET --url http://127.0.0.1:8000/{identifier}

About

A fast in-memory URL shortener made in Rust as a personal challenge

Topics

Resources

Stars

Watchers

Forks

Languages