christianmalek / backend

Distrochooser's database backend

Repository from Github https://github.comchristianmalek/backendRepository from Github https://github.comchristianmalek/backend

distrochooser-backend

This repository contains an experimental implementation of the distrochooser.de-backend.

Flaws

It is an experiment. It's slow and I do not know Rust at all.

  • uses unsafe (is a flaw?)
  • no central database connection.. always calling connect_database
  • is kinda slow
  • throws a lot warnings
  • code is not clean
  • no error handling, threads crash hard causing HTTP 500
  • dirty workarounds

Routes

  • /distributions/:lang/
  • /distribution/:id/:lang/
  • /questions/:lang/
  • /i18n/:lang/
  • /newvisitor/
  • /get/:lang/ (combines /distributions /questions /i18n and /newvisitor)
  • /addresult/
  • /getstats/
  • /lastratings/
  • /addrating/@lang

Build

cargo run /path/to/db.conf

Usage

rusty_distrochooser /path/to/db.conf

db.conf: mysql://$username:$password@$host

About

Distrochooser's database backend

License:GNU General Public License v3.0


Languages

Language:Rust 100.0%