datatrash/README.md

33 lines
968 B
Markdown
Raw Normal View History

2020-07-09 20:01:25 +00:00
# datatrash
A file and text uploading service with configurable time limit
![Application screenshot](./screenshot.png)
## 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
2020-07-11 21:27:15 +00:00
| 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 |
2020-07-09 20:01:25 +00:00
Other things are not configurable yet.
- The maximum filename length is 255