Gunwant Jain
2e4b929fb5
cargo fix the project
...
Make use of clippy and rustfmt
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2021-01-21 16:34:59 +05:30
Gunwant Jain
651f3d8157
pretty_retrieve: use match_filname to match MIME
...
fixes pastes which had JSON, Bash, etc. content.
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2021-01-06 10:00:49 +05:30
Gunwant Jain
c2ad9ffd90
main.rs: add /submit route
...
Getting into frontend biz.
Also s/HOST/HOST_URL/ because I didn't realise that HOST is already a
taken variable.
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2021-01-06 06:13:03 +05:30
Gunwant Jain
ae8bd544de
index: use templates for the index route
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2021-01-06 05:16:28 +05:30
Gunwant Jain
7cfe364b8c
pretty.html: fetch stylesheet only if the var is declared
...
otherwise the app will perform an unnecessary 404 request everytime a
theme is not declared
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2021-01-06 00:58:10 +05:30
Gunwant Jain
ef96dcff33
correct usage guides
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2020-12-30 06:35:19 +05:30
Gunwant Jain
27f84bbe3b
add readme
...
Needs a hosting guide too.
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2020-12-30 04:37:30 +05:30
Gunwant Jain
5fc487c705
use environment variables to configure settings
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2020-12-30 04:19:46 +05:30
Gunwant Jain
1bc532d237
index: improve the usage guide
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2020-12-30 03:41:54 +05:30
Gunwant Jain
c138e9ad3e
fix MIME types and add examples
...
cpp files were getting recognised as "text/csrc". checking subtrings is
a better way to compare MIME types.
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2020-12-29 21:37:54 +05:30
Gunwant Jain
855a0faec2
routes: implement syntax highlighting for plaintext files
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2020-12-29 19:35:21 +05:30
Gunwant Jain
66ea75de7f
add /p/<id> routes
...
This is to work with text/plain type files only
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2020-12-29 17:37:29 +05:30
Gunwant Jain
805e4ce7d2
initialise
...
routes:
GET /<id>
POST /
Signed-off-by: Gunwant Jain <mail@wantguns.dev >
2020-12-29 15:44:15 +05:30