main: add more routes for pretty pasting

cleaned up code and added a route for signifying code language
explicitly at `/p/<filename>.<ext>`
Also async-ified the server after upgrading Rocket to 0.5-rc1

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
Gunwant Jain
2021-07-08 18:43:47 +05:30
parent 150bade1e5
commit 78d046afbd
3 changed files with 102 additions and 35 deletions

View File

@@ -6,7 +6,11 @@ edition = "2018"
[dependencies]
rand = "0.8.0"
rocket = "0.4.6"
rocket_contrib = { version = "0.4.6", features = ["tera_templates"] }
rocket = "0.5.0-rc.1"
tree_magic = "0.2.3"
syntect = "4.5.0"
[dependencies.rocket_dyn_templates]
version = "0.1.0-rc.1"
features = ["tera"]