Serve protobuf files statically.
This commit is contained in:
parent
b40b0b3a5c
commit
4024f32621
|
@ -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" ]
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue