Actually we should export the path too

main
Charlotte Som 2023-11-16 04:37:56 +00:00
parent 67c65c4f1b
commit 77a5af4b6b
1 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,7 @@
import ngx from "https://char.lt/ngx/ngx.ts?v=1";
export const site = ngx("server", [
export const config = ngx("server", [
[
"server_name bio.char.lt",
...ngx.listen(),
@ -11,6 +11,8 @@ export const site = ngx("server", [
ngx("location /", ["root /srv/http/bio.char.lt/public"]),
]);
export const path = "/etc/nginx/http.d/bio-char-lt.conf";
if (import.meta.main) {
site.write("/etc/nginx/http.d/bio-char-lt.conf");
config.write(path);
}