hatchyt
Version:
Hatch your next idea.
11 lines (8 loc) • 1.5 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (ctx) {
return "log_format hatchyt '[$time_local] $host :: $server_name :: $uri :: \"$request\" $status';\n\nserver {\n listen 80 default_server;\n access_log " + ctx.root + "/.hatchyt/access.log hatchyt;\n index index.html;\n\n error_page 404 /404.html;\n\n location = /404.html {\n root " + ctx.root + "/.hatchyt;\n internal;\n }\n\n location @node {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host $host;\n proxy_cache_bypass $http_upgrade;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n }\n\n location /track {\n try_files /noop @node;\n }\n\n location /sign {\n try_files /noop @node;\n }\n\n\n location / {\n root " + ctx.root + "/.hatchyt/output/$http_host;\n }\n}\n\nserver {\n server_name " + ctx.admin + ".*;\n listen 80;\n\n location / {\n proxy_pass http://localhost:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host $host;\n proxy_cache_bypass $http_upgrade;\n }\n}\n";
};
//# sourceMappingURL=nginxconf.js.map