Skip to content

moesoha/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener

This is a public copy of OIH URL Shortener which runs on oih.me currently.

Get Started

First you should execute the latest SQL script in the directory ./sql for database.

Then make sure you have installed Rust toolchain.

For Developing

cargo run

For Production

cargo run --release

or

cargo build --release and then execute binary file in ./target/release

Add a Short Token

PUT /

Params in request body:

  • url Redirect to there
  • token (Optional) custom short token

DBA

INSERT INTO `short_token` (`token`,`target`) VALUES (:token,:target)

Environment Variables

DATABASE_URL A URL that describes MySQL server connection information.

ROCKET_* Check Rocket.rs for details.

About

A simple URL shortener written in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages