Use nginx to serve the website
All checks were successful
Build and test project / build-and-test (push) Successful in 1m29s
All checks were successful
Build and test project / build-and-test (push) Successful in 1m29s
This commit is contained in:
@@ -26,4 +26,11 @@ if [ ! -f "$DIST_DIR/wasm/kobopatch.wasm" ]; then
|
||||
fi
|
||||
|
||||
echo "Serving at http://localhost:8888"
|
||||
python3 -m http.server -d "$DIST_DIR" 8888
|
||||
if command -v nginx &>/dev/null; then
|
||||
export PORT=8888
|
||||
envsubst '${PORT}' < "$SCRIPT_DIR/nginx.conf.template" > /tmp/kobopatch-nginx.conf
|
||||
nginx -c /tmp/kobopatch-nginx.conf -g 'daemon off;'
|
||||
else
|
||||
echo "(nginx not found, using Node.js server)"
|
||||
node serve.mjs
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user