From 637a246caaebc87da0301af1f3a2fee3f78f22c0 Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Fri, 5 Jul 2024 21:31:48 -0700 Subject: [PATCH] Set up a hot reload framework for running the front end. --- .gitignore | 1 + frontend/Caddyfile | 14 ++++++++++++++ frontend/elm-watch.json | 10 ++++++++++ frontend/index.html | 13 +++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 frontend/Caddyfile create mode 100644 frontend/elm-watch.json create mode 100644 frontend/index.html diff --git a/.gitignore b/.gitignore index 4412991..842a211 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ target/ .env *.db +frontend/build frontend/elm-stuff diff --git a/frontend/Caddyfile b/frontend/Caddyfile new file mode 100644 index 0000000..f1a127d --- /dev/null +++ b/frontend/Caddyfile @@ -0,0 +1,14 @@ +{ + auto_https off +} + +http://localhost:8000 + +handle_errors { + rewrite * /index.html + file_server +} + +file_server + + diff --git a/frontend/elm-watch.json b/frontend/elm-watch.json new file mode 100644 index 0000000..abdc6a2 --- /dev/null +++ b/frontend/elm-watch.json @@ -0,0 +1,10 @@ +{ + "targets": { + "Captain's Log": { + "inputs": [ + "src/Main.elm" + ], + "output": "build/main.js" + } + } +} diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000..ae6e0ae --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,13 @@ + + + + + Captains Log + + + + + +