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:
|
||||
pkgs.writeScriptBin "serve" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
cd ${path}
|
||||
${pkgBin "caddy"} run --config Caddyfile
|
||||
${pkgs.nodePackages.http-server}/bin/http-server -c-1 ${path}
|
||||
'';
|
||||
|
||||
mkSitePath = site: let
|
||||
@ -92,15 +90,6 @@ in {
|
||||
User-agent: *
|
||||
Allow: /
|
||||
'';
|
||||
"Caddyfile" = ''
|
||||
${baseurl}
|
||||
|
||||
handle_errors {
|
||||
rewrite * /{http.error.status_code}.html
|
||||
file_server
|
||||
}
|
||||
file_server
|
||||
'';
|
||||
};
|
||||
};
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user