diff --git a/bio-char-lt.ngx.ts b/bio-char-lt.ngx.ts index c4c7b88..d88ae22 100644 --- a/bio-char-lt.ngx.ts +++ b/bio-char-lt.ngx.ts @@ -2,11 +2,15 @@ import ngx from "https://char.lt/ngx/ngx.ts?v=1"; -ngx("server", [ +export const site = ngx("server", [ [ "server_name bio.char.lt", ...ngx.listen(), ...ngx.letsEncrypt("bio.char.lt"), ], ngx("location /", ["root /srv/http/bio.char.lt/public"]), -]).write("/etc/nginx/http.d/bio-char-lt.conf"); +]); + +if (import.meta.main) { + site.write("/etc/nginx/http.d/bio-char-lt.conf"); +}