Serve protobuf files statically.
This commit is contained in:
parent
1d5b9eaf4f
commit
1566790a82
|
@ -26,4 +26,4 @@ strum = { version = "0.20", features = ["derive"] }
|
||||||
[dependencies.rocket_contrib]
|
[dependencies.rocket_contrib]
|
||||||
version = "0.4.6"
|
version = "0.4.6"
|
||||||
default-features = false
|
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]
|
#[macro_use]
|
||||||
extern crate serde_derive;
|
extern crate serde_derive;
|
||||||
|
|
||||||
|
use rocket_contrib::serve::StaticFiles;
|
||||||
use rocket_contrib::templates::Template;
|
use rocket_contrib::templates::Template;
|
||||||
|
|
||||||
pub mod catchers;
|
pub mod catchers;
|
||||||
|
@ -39,6 +40,10 @@ fn main() {
|
||||||
.attach(db::TenebrousDbConn::fairing())
|
.attach(db::TenebrousDbConn::fairing())
|
||||||
.mount("/", root_routes)
|
.mount("/", root_routes)
|
||||||
.mount("/characters", character_routes)
|
.mount("/characters", character_routes)
|
||||||
|
.mount(
|
||||||
|
"/protos",
|
||||||
|
StaticFiles::from(concat!(env!("CARGO_MANIFEST_DIR"), "/proto")),
|
||||||
|
)
|
||||||
.register(catchers)
|
.register(catchers)
|
||||||
.launch();
|
.launch();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue