diff --git a/nomad/agg-population.nomad.hcl b/nomad/agg-population.nomad.hcl new file mode 100644 index 0000000..2e01062 --- /dev/null +++ b/nomad/agg-population.nomad.hcl @@ -0,0 +1,27 @@ +job "agg-population" { + type = "service" + + update { + max_parallel = 1 + stagger = "10s" + } + + group "api" { + count = 1 + + network { + port "http" { + static = 3000 + } + } + + task "api" { + driver = "docker" + + config { + image = "ghcr.io/genudine/agg-population/agg-population:7ef2fe757cec4da36fa9462a09403bbf022f77fa" + ports = ["http"] + } + } + } +} \ No newline at end of file diff --git a/src/html/index.html b/src/html/index.html index a008d03..ce23ca2 100644 --- a/src/html/index.html +++ b/src/html/index.html @@ -47,8 +47,8 @@ >
Results are cached for 3 minutes. Requesting faster is a dumb idea.
diff --git a/src/main.rs b/src/main.rs index 11a9ea3..535dd13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,8 +17,9 @@ async fn main() { let app = Router::new() .route("/", get(root)) - .route("/worlds/all", get(get_all_worlds)) - .route("/worlds/:world", get(get_one_world)) + .route("/population", get(root)) + .route("/population/all", get(get_all_worlds)) + .route("/population/:world", get(get_one_world)) .layer(TraceLayer::new_for_http()) .with_state(db);