egui/sh/start_server.sh

19 lines
516 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2020-04-12 10:07:51 +00:00
set -eu
2021-05-09 11:28:24 +00:00
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/.."
2020-04-12 10:07:51 +00:00
2021-02-28 18:51:22 +00:00
# Starts a local web-server that serves the contents of the `doc/` folder,
2021-02-21 09:12:08 +00:00
# i.e. the web-version of `egui_demo_app`.
PORT=8888
echo "ensuring basic-http-server is installed…"
2021-02-21 09:12:08 +00:00
cargo install basic-http-server
echo "starting server…"
echo "serving at http://localhost:${PORT}"
2021-02-21 09:12:08 +00:00
(cd docs && basic-http-server --addr 127.0.0.1:${PORT} .)
# (cd docs && python3 -m http.server ${PORT} --bind 127.0.0.1)