[英]How to redirect the loopback4 home screen to angular 8 application running some other port
In loopback 3, client root config is defind in middilware.json file,在环回 3 中,客户端根配置在 middilware.json 文件中定义,
"files": {
"loopback#static": {
"params": "$!../client"
}
},
like in loopback 4, application.ts file has the path for home page of lb4就像在环回 4 中一样,application.ts 文件具有 lb4 主页的路径
// Set up default home page
this.static('/', path.join(__dirname, '../public'));
now i'm working with LB4 server and Angular 8 application, here i need to redirect lb4 home page is angular application.现在我正在使用 LB4 服务器和 Angular 8 应用程序,这里我需要重定向 lb4 主页是 angular 应用程序。 how to configure this case?
如何配置这种情况? Help me to solve this..!
帮我解决这个..!
It is possible to replace this.static()
with this.redirect()
:可以用
this.static()
替换 this.static this.redirect()
:
this.redirect('/', 'https://www.example.com/');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.