Serve protobuf files statically.

This commit is contained in:
projectmoon 2020-12-09 22:21:31 +00:00
parent b40b0b3a5c
commit 4024f32621
2 changed files with 6 additions and 1 deletions

View File

@ -26,4 +26,4 @@ strum = { version = "0.20", features = ["derive"] }
[dependencies.rocket_contrib]
version = "0.4.6"
default-features = false
features = [ "tera_templates", "diesel_sqlite_pool" ]
features = [ "tera_templates", "diesel_sqlite_pool", "serve" ]

View File

@ -14,6 +14,7 @@ extern crate diesel;
#[macro_use]
extern crate serde_derive;
use rocket_contrib::serve::StaticFiles;
use rocket_contrib::templates::Template;
pub mod catchers;
@ -39,6 +40,10 @@ fn main() {
.attach(db::TenebrousDbConn::fairing())
.mount("/", root_routes)
.mount("/characters", character_routes)
.mount(
"/protos",
StaticFiles::from(concat!(env!("CARGO_MANIFEST_DIR"), "/proto")),
)
.register(catchers)
.launch();
}