change port post-build

This commit is contained in:
Andy Killorin 2023-12-20 20:19:09 -06:00
commit 5ba83793b5
Signed by: ank
GPG key ID: B6241CA3B552BCA4

View file

@ -1,9 +1,19 @@
.PHONY: server server-opt
server: surnames.txt names.txt ipaddr.txt
GLOBAL_IP=$(cat ipaddr.txt) cargo run
DEVPORT=1505
DEVFILE="offline-state.json"
PRODPORT=48228
PRODFILE="state.json"
MANIFEST=../Cargo.toml
.PHONY: local global
local: surnames.txt names.txt ipaddr.txt
echo '"localhost"' > ipaddr.txt
cargo run $(DEVPORT) $(DEVFILE)
server-opt: surnames.txt names.txt ipaddr.txt
GLOBAL_IP=$(cat ipaddr.txt) cargo run --release
global: surnames.txt names.txt ipaddr.txt
make -B ipaddr.txt
mkdir -p prod
cd prod; cargo run --release $(PRODPORT) $(PRODFILE)
surnames.txt:
curl https://raw.githubusercontent.com/Hyneman/moby-project/672f6bdca054c42d375f065ffee87e8ceba0c242/moby/mwords/21986na.mes |\