mholt / caddy-embed Goto Github PK
View Code? Open in Web Editor NEWCaddy plugin for embedding static files directly into the server binary
License: MIT License
Caddy plugin for embedding static files directly into the server binary
License: MIT License
On my machine the build take about 9 hour and still running, so I terminate it. Do you know why this is happen?
I'm using Ubuntu 22.04.2 LTS, go version 1.20.6, xcaddy v0.3.4
Step to reproduce
sudo apt install xcaddy
git clone https://github.com/mholt/caddy-embed.git && cd caddy-embed
xcaddy build --with github.com/mholt/caddy-embed=.
I tried reinstall xcaddy with go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
and the output still the same. Do you think is xcaddy bug?
Currently, this approach has some UX problems. It requires cloning this repo and copying the files to embed to inside of the repo. This is awkward for various reasons, such as fighting with git
with the files
directory, having to clone at all meaning you have some extra directory sitting around, having to copy your files yourself (i.e. needing to write a script/Makefile to automate it), needing to modify module.go
if you want to rename the embed, etc.
My suggestion is that we could move this to the https://github.com/caddyserver/xcaddy project, where it would be a build flag, i.e. xcaddy build --embed <path>
. Then xcaddy
would create the module.go
file itself into a temp dir, optionally change the //go:embed
line to use a different base path (maybe with another flag like --embed-dir
), copy the given path (files to embed) to inside of the temp dir, then invoke the build as normal.
I think this would be significantly better UX, because there would be no need for messing around with git
, no copying files by hand, no need to write your own build script to make it work as a repeated command. It would just become an argument to the xcaddy build
command they (probably) already use.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.