13 lines
345 B
TypeScript
13 lines
345 B
TypeScript
import ngx from "jsr:@char/ngx@0.1";
|
|
|
|
export const config = ngx("server", [
|
|
[
|
|
"listen 80 default_server",
|
|
"listen [::]:80 default_server"
|
|
],
|
|
ngx("location '/.well-known/acme-challenge'", ["root /srv/www/acme"]),
|
|
ngx("location /", ["return 302 https://$host$request_uri"]),
|
|
]);
|
|
|
|
if (import.meta.main) console.log(config.build());
|