Yeah, Caddy v2 is more of an “app platform”, where you plug your own code into it. It’s not really meant to be used as a library. It’s probably possible to do it, but no docs have been written about it and no extra effort has been made to make that usecase viable.
If you want to write your own server code instead, you can use certmagic as a library to provide you with automatic HTTPS; it was designed for use in Caddy as a library, and others have had success with it in their own projects as well.
And if you don’t want to worry about TLS at all, you can use Caddy as a reverse proxy that terminates TLS, and run your own server separately behind Caddy.
Thanks for your replays folks
but i still dont understand
i need something like java tomcat , i like to replace it as i don’t what to relay on any JVM
i want a fast self-contained static linked web server .
write GO server code as the business logic
And yes SSL support
i really don’t what some side option or hack but the real standard way to write server code .
And way to able to find documentation and support when needed
Thanks !
I don’t know for sure, but it seems FastCGI would work with GO programs. I am still new to Caddy, but I am using PHP for my application logic and it works great with Caddy.