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