all repos — website @ a86e275fdbde49b5530f09915a4f3ec3f6d6a308

My website

move server code to cmd/server

Alan Pearce
commit

a86e275fdbde49b5530f09915a4f3ec3f6d6a308

parent

c258ad4dfcd394c212073d6bd809de9754c30955

3 files changed, 6 insertions(+), 6 deletions(-)

changed files
M nix/default.nixnix/default.nix
@@ -14,7 +14,7 @@ (pkgs.writeTextDir "config.toml" (builtins.readFile ./../config.toml))
public ]; config = { - Cmd = [ "${server}/bin/website" ]; + Cmd = [ "${server}/bin/server" ]; Env = [ "PRODUCTION=true" "LISTEN_ADDRESS=::"
@@ -39,7 +39,7 @@ root = ./..;
fileset = unions [ ./../go.mod ./../go.sum - ./../cmd + ./../cmd/build ./../internal ]; };
@@ -61,7 +61,7 @@ } ''
${builder}/bin/build -s $src -d $out/public ''; server = buildGoApplication { - pname = "website"; + pname = "server"; inherit version; CGO_ENABLED = 0; src = with lib.fileset; toSource {
@@ -69,7 +69,7 @@ root = ./..;
fileset = unions [ ./../go.mod ./../go.sum - ./../server.go + ./../cmd/server ./../internal ]; };
M nix/scripts.nixnix/scripts.nix
@@ -16,10 +16,10 @@ image = system: "nix build ${(mkAttr "image") system}";
in with pkgs; [ (writeShellScriptBin "watch-builder" '' - ${watchFlake} "direnv exec . watchexec -i server.go -i public -r go run ./cmd/build $@" + ${watchFlake} "direnv exec . watchexec -i cmd/server -i public -r go run ./cmd/build $@" '') (writeShellScriptBin "watch-server" '' - ${watchFlake} "direnv exec . watchexec -r go run ./server.go $@" + ${watchFlake} "direnv exec . watchexec -r go run ./cmd/server $@" '') (writeShellScriptBin "check-licenses" '' ${go-licenses}/bin/go-licenses check --include_tests ./... --disallowed_types=restricted,forbidden