Add ngx script for nginx config

main
Charlotte Som 2023-11-16 04:35:44 +00:00
parent 932164294e
commit 316d7b52d8
2 changed files with 15 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "ngx"]
path = ngx
url = git@lavender.software:char/ngx.git

12
bio-char-lt.ngx.ts Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env -S deno run -A
import ngx from "https://char.lt/ngx/ngx.ts?v=1";
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");