@das-fed/cli 6.4.0-dev.73 → 6.4.0-dev.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import fs from"fs-extra";import{dirname,resolve}from"path";import{fileURLToPath}from"url";let __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),generateNginx=async e=>{let{cwd:r,mainAppName:a="",microAppName:i="",microApps:
|
1
|
+
import fs from"fs-extra";import{dirname,resolve}from"path";import{fileURLToPath}from"url";let __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),generateNginx=async e=>{let{cwd:r,mainAppName:a="",microAppName:i="",microApps:o=""}=e;0<o.length&&(o=o.map(e=>({...e,name:e.name.toLocaleLowerCase()}))),a=a.toLocaleLowerCase(),i=i.toLocaleLowerCase();a;var e=!!i,n=resolve(__dirname,"./nginx.main.conf"),t=resolve(__dirname,"./nginx.micro.conf"),l=resolve(r,"public/nginx.conf"),n=(await fs.ensureFile(l),fs.readFileSync(n).toString());let m=fs.readFileSync(t).toString();e&&(m=m.replace(/\{url\}/g,("/web/"+i.split("/").pop()).replace(/\/\//g,"/"))),await fs.writeFile(l,e?m:n)};export{generateNginx};
|
@@ -38,11 +38,6 @@ http {
|
|
38
38
|
server {
|
39
39
|
listen 80;
|
40
40
|
etag on;
|
41
|
-
location / {
|
42
|
-
root /usr/share/nginx/html;
|
43
|
-
try_files $uri $uri/ /index.html;
|
44
|
-
expires 0;
|
45
|
-
}
|
46
41
|
|
47
42
|
location ~ ^/(api|oss)/ {
|
48
43
|
proxy_pass http://gateway:9080;
|
@@ -50,7 +45,7 @@ http {
|
|
50
45
|
|
51
46
|
location {url} {
|
52
47
|
alias /usr/share/nginx/html;
|
53
|
-
try_files $uri $uri/
|
48
|
+
try_files $uri $uri/ /index.html;
|
54
49
|
expires 0;
|
55
50
|
}
|
56
51
|
|