summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-10-12 18:54:01 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-10-13 16:21:30 -0700
commitc9ff89b5f3660a9b9ec094141327f006d1633438 (patch)
tree38346684e0b4c0ad7add817e04d969bbe1a3a04a
parent6214e9f251cfa945641d9fbd2149746e83ec8331 (diff)
downloadfatcat-c9ff89b5f3660a9b9ec094141327f006d1633438.tar.gz
fatcat-c9ff89b5f3660a9b9ec094141327f006d1633438.zip
fatcatd: display version correctly, and at startup
-rw-r--r--rust/src/bin/fatcatd.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/rust/src/bin/fatcatd.rs b/rust/src/bin/fatcatd.rs
index b27ff911..006154df 100644
--- a/rust/src/bin/fatcatd.rs
+++ b/rust/src/bin/fatcatd.rs
@@ -35,7 +35,11 @@ impl AfterMiddleware for XClacksOverheadMiddleware {
/// Create custom server, wire it to the autogenerated router,
/// and pass it to the web server.
fn main() -> Result<()> {
- let _matches = App::new("server").get_matches();
+ let _matches = App::new("fatcatd")
+ .version(env!("CARGO_PKG_VERSION"))
+ .author("Bryan Newbold <bnewbold@archive.org>")
+ .about("Fatcat API Server")
+ .get_matches();
dotenv::dotenv().ok();
@@ -137,7 +141,9 @@ fn main() -> Result<()> {
let host_port = "localhost:9411";
info!(
logger,
- "Starting fatcatd API server on http://{}", &host_port
+ "Starting fatcatd API server version {} on http://{}",
+ env!("CARGO_PKG_VERSION"),
+ &host_port,
);
let mut chain = Chain::new(LoggerMiddleware::new(router, logger, formatter));