Properly running Caddy with Vue

1. My Caddy version (caddy -version):

Caddy v1.0.4

2. How I run Caddy:

a. System environment:

Mac, no docker, using Vue CLI

b. Command:

caddy

c. Service/unit/compose file:

paste full file contents here

d. My complete Caddyfile:

localhost:8080

proxy /test localhost:9000

3. The problem I’m having:

I am trying to let Caddy serve the content instead of Vue CLI, so for example right now, I when I start the Vue CLI, it serves the content at localhost:8080, but instead I want to let Caddy serve the contents, how should I do this?

Hi @darkdragon,

The simplest way is to run Caddy on another port and have it reverse proxy to Vue.

The alternative would be finding where the files are, and how Vue’s development server is designed to handle requests, and attempting to configure Caddy to do the same. I’m not familiar with Vue to advise where to start with that one.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.