diff --git a/TODO b/TODO index 887a0dd39..8c9e71d4d 100644 --- a/TODO +++ b/TODO @@ -7,3 +7,5 @@ web端运行脚本似乎异常 举报功能 SETTINGS_PRIVACY.allowRegisteredUsers model.setting.ui.name +pdoc.secretConfig? +在线IDE 更换颜色主题 diff --git a/examples/h2o.conf b/examples/h2o.conf new file mode 100644 index 000000000..f031b48b0 --- /dev/null +++ b/examples/h2o.conf @@ -0,0 +1,9 @@ +listen: + port: 8080 +hosts: + "*": + paths: + /: + proxy.reverse.url: "http://[unix:/home/hydro/hydro.sock]" + proxy.preserve-host: ON + proxy.websocket: ON \ No newline at end of file diff --git a/examples/nginx.conf b/examples/nginx.conf new file mode 100644 index 000000000..f42b9c3fb --- /dev/null +++ b/examples/nginx.conf @@ -0,0 +1,17 @@ +server { + listen 8080; + server_name localhost; + root /tmp/hydro/public; + + location / { + try_files $uri @proxy_to_app; + } + + location @proxy_to_app { + proxy_pass http://unix:/home/hydro/hydro.sock; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header X-Forwarded-For $remote_addr; + } +} \ No newline at end of file diff --git a/hydro/error.ts b/hydro/error.ts index a985b8eee..e1ef92c8c 100644 --- a/hydro/error.ts +++ b/hydro/error.ts @@ -2,7 +2,7 @@ const { isClass } = require('./utils'); interface IHydroError { - new(...args: any[]): HydroError + new(...args: any[]): HydroError } const Err = (name: string, ...info: Array) => { @@ -29,19 +29,19 @@ const Err = (name: string, ...info: Array