feat: use http-server instead of caddy

This commit is contained in:
dusk 2022-07-31 03:51:59 +03:00
parent 54b5c7f003
commit 985cac1b89
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA

View File

@ -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