Caddy is a simple http server written in go.
In most of our frontend deployments we end up using nginx to serve static files (i.e, SPA applications). There's a lot of good things in nginx, however we thrive simpler configurations with superpowers.
Caddy provides a lot of useful features:
- Simple reverse-proxy syntax
- Access to environment variables
- HTTP/2 and QUIC
- Https by default (although we won't use it directly)
cd bff
npm install
node index.js
cd frontend-static
caddy -envfile .env.example -port 8080
Open localhost:8080
cd frontend-webpack
npm install
npm run build
caddy -envfile .env.example -port 8080
or
cd frontend-webpack
cp .env.example .env
npm install
npm start
Open localhost:8080
docker-compose up --build --force-recreate
Open localhost:8080 and localhost:8081