feat: use http-server instead of caddy
This commit is contained in:
parent
54b5c7f003
commit
985cac1b89
13
pkgs-lib.nix
13
pkgs-lib.nix
@ -6,9 +6,7 @@
|
|||||||
|
|
||||||
mkServePathScript = path:
|
mkServePathScript = path:
|
||||||
pkgs.writeScriptBin "serve" ''
|
pkgs.writeScriptBin "serve" ''
|
||||||
#!${pkgs.stdenv.shell}
|
${pkgs.nodePackages.http-server}/bin/http-server -c-1 ${path}
|
||||||
cd ${path}
|
|
||||||
${pkgBin "caddy"} run --config Caddyfile
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mkSitePath = site: let
|
mkSitePath = site: let
|
||||||
@ -92,15 +90,6 @@ in {
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
Allow: /
|
Allow: /
|
||||||
'';
|
'';
|
||||||
"Caddyfile" = ''
|
|
||||||
${baseurl}
|
|
||||||
|
|
||||||
handle_errors {
|
|
||||||
rewrite * /{http.error.status_code}.html
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
file_server
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user