Compare commits
No commits in common. "ac63fd834961891103b244cefecf223494d8add6" and "9d503d53ccba5fee82549290cb4dd322a6ca263b" have entirely different histories.
ac63fd8349
...
9d503d53cc
@ -1,14 +0,0 @@
|
|||||||
FROM rust:1.80.1 AS build
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y lld
|
|
||||||
|
|
||||||
WORKDIR /workspace
|
|
||||||
|
|
||||||
COPY src /workspace/src
|
|
||||||
COPY Cargo.toml /workspace/
|
|
||||||
COPY Cargo.lock /workspace/
|
|
||||||
|
|
||||||
RUN cargo build
|
|
||||||
|
|
||||||
|
|
||||||
FROM build AS dev
|
|
@ -1,19 +0,0 @@
|
|||||||
dev-image:
|
|
||||||
docker build -t cargo-server-dev --target dev .
|
|
||||||
|
|
||||||
.PHONY: dev
|
|
||||||
dev: dev-image ## Start a dev container
|
|
||||||
docker run -it --rm \
|
|
||||||
-v $(CURDIR)/src:/workspace/src \
|
|
||||||
-v $(CURDIR)/Cargo.toml:/workspace/Cargo.toml \
|
|
||||||
-v $(CURDIR)/Cargo.lock:/workspace/Cargo.lock \
|
|
||||||
-p 127.0.0.1:8080:8080 \
|
|
||||||
cargo-server-dev \
|
|
||||||
bash
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: help
|
|
||||||
help: ## Show this help
|
|
||||||
@echo Noteworthy targets:
|
|
||||||
@egrep '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
|
||||||
.DEFAULT_GOAL := help
|
|
@ -49,7 +49,7 @@ async fn main() -> tide::Result<()> {
|
|||||||
let mut app = tide::new();
|
let mut app = tide::new();
|
||||||
app.at("/api/system/:seed").get(get_system);
|
app.at("/api/system/:seed").get(get_system);
|
||||||
app.at("/api/body/:seed").get(get_body);
|
app.at("/api/body/:seed").get(get_body);
|
||||||
app.listen("0.0.0.0:8080").await?;
|
app.listen("127.0.0.1:8080").await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,4 +259,4 @@ async fn get_system(_req: Request<()>) -> tide::Result {
|
|||||||
})?)
|
})?)
|
||||||
.build();
|
.build();
|
||||||
Ok(response)
|
Ok(response)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user