Go to file
neri 4af61bfd86 add environment variable configuration 2020-07-11 23:27:15 +02:00
src add environment variable configuration 2020-07-11 23:27:15 +02:00
static finish it i guess 2020-07-09 19:27:32 +02:00
template add environment variable configuration 2020-07-11 23:27:15 +02:00
.env Initial commit 2020-07-08 21:33:48 +02:00
.gitignore Initial commit 2020-07-08 21:33:48 +02:00
Cargo.lock finish it i guess 2020-07-09 19:27:32 +02:00
Cargo.toml finish it i guess 2020-07-09 19:27:32 +02:00
README.md add environment variable configuration 2020-07-11 23:27:15 +02:00
init-db.sql add readme, extract init-db script 2020-07-09 22:01:25 +02:00
screenshot.png add readme, extract init-db script 2020-07-09 22:01:25 +02:00

README.md

datatrash

A file and text uploading service with configurable time limit

Application screenshot

compiling

Compiling is a little strange. The SQL-statements are checked for correctness at compile-time, unfortunately this means that the database needs to be running at compile-time too.

To get set up:

  • Start a postgresql somewhere
  • Set its connection url in the .env file
  • Run the init-db.sql script in the database (cat init-db.sql | psql)
  • Build the project cargo build --release

running & config

environment variable default value
DATABASE_URL postresql://localhost
SERVER_URL http://loalhost:8000
FILES_DIR ./files
UPLOAD_MAX_BYTES 8388608 (8MiB)
BIND_ADDRESS 0.0.0.0:8000

Other things are not configurable yet.

  • The maximum filename length is 255