Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/recuencojones/caddy-frontend
Deploy frontend application with Caddy
https://github.com/recuencojones/caddy-frontend
caddy kubesail vue webpack
Last synced: 8 days ago
JSON representation
Deploy frontend application with Caddy
- Host: GitHub
- URL: https://github.com/recuencojones/caddy-frontend
- Owner: RecuencoJones
- Created: 2019-12-03T21:02:45.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-01T14:04:51.000Z (about 2 years ago)
- Last Synced: 2024-11-07T11:53:21.742Z (about 2 months ago)
- Topics: caddy, kubesail, vue, webpack
- Language: JavaScript
- Size: 1.7 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Caddy as nginx alternative for frontend
[Caddy](https://caddyserver.com/) 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)## Run the example
### Bff (backend for frontend)
```
cd bff
npm install
node index.js
```### Static
```
cd frontend-static
caddy -envfile .env.example -port 8080
```Open [localhost:8080](http://localhost:8080)
### Webpack
```
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](http://localhost:8080)
## Run the example with docker-compose
```
docker-compose up --build --force-recreate
```Open [localhost:8080](http://localhost:8080) and [localhost:8081](http://localhost:8081)