http-envinfo 0.1.0

This package provides JSON API of health for microservice. It's using rocket framework.
#[macro_use]
extern crate rocket;

mod health_probes;
mod local_environment;

use health_probes::{alive, health, ready, started};
// use log::{error, warn, info, debug, trace};
use log::info;

#[get("/")]
fn local_env() -> (rocket::http::ContentType, String) {
    info!("Root endpoint access. Return the local environment.");

    // Business algorithm
    (
        rocket::http::ContentType::JSON,
        local_environment::local_environment_impl::get_local_env(),
    )
}

#[launch]
fn rocket() -> _ {
    rocket::build().mount("/", routes![local_env, health, alive, ready, started])
}