Skip to content

AzariasB/Rus

Repository files navigation

Rus : a Rust URL Shortener

The project structure is largely inspired from the sea orm actix example

Notable libs used :

  • Actix for the web server
  • Sea ORM to handle the database queries

Use with docker

To start rus with docker :

# This might take a while to build all the dependencies
docker build -t rus .
docker run --restart unless-stopped --env RUS_HOST=0.0.0.0 --env RUS_PORT=8000 --env RUS_DATABASE_URL="postgresql://<user>:<password>@127.0.0.1/<databasename>"  -p "8000:8000" rus 

Then go with a web browser to the address localhost:8000 to see if everything's going well.

TODO

  • Add Docker support
  • Add Github pipeline
  • Validate url passed into parameters
  • Handle in-memory caching of data
  • Handle caching of data via redis
  • Return 404 when the url doesn't exit
  • Save Ip address of user creating the url
  • Update last access date when the link is clicked
  • Use the correct logging system
  • Handle link expiring: delete from database, and cache
  • Use Elm as a frontend framework
  • Improve overall style

About

A Rust Url Shortener

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published