Skip to content

Instantly share code, notes, and snippets.

@AxelRHD
Last active November 3, 2022 19:59
Show Gist options
  • Save AxelRHD/08b5930b9c8686aa56c4d417c035ebb6 to your computer and use it in GitHub Desktop.
Save AxelRHD/08b5930b9c8686aa56c4d417c035ebb6 to your computer and use it in GitHub Desktop.
Elm-SPA with Caddy Dev-Server
{
auto_https off
admin :2020
}
:1235 {
handle_path /api* {
reverse_proxy :3005 #pointing to a dev-api-server
}
reverse_proxy :1234
try_files {path} {path}/ /index.html # not working as expected yet
}
{
"name": "elm-spa-playground",
"version": "0.1.0",
"author": "AxelRHD",
"license": "MIT",
"scripts": {
"dev:spa": "elm-spa server",
"dev:caddy": "caddy run",
"dev": "run-p dev:spa dev:caddy"
},
"devDependencies": {
"elm": "^0.19.1-5",
"elm-spa": "^6.0.4",
"npm-run-all": "^4.1.5"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment