简体   繁体   中英

How do i deploy angular project on firebase

I have a project built with Angular and C#.I deployed the angular project to firebase but when I enter the site, I can't connect with the backend and I can't login.How do i solve this problem or can anyone offer another solution?

错误信息

It's basically a server issue. You've set up your server base url to be localhost:44340, which seems to be the url when you're on your computer.

But since you host it on firebase, your C# server is not accessible from that url (local one, not accessible from the web). You need to specifiy the public url for your backend server.

You can do that with the environment files, you can for exemple specify a different environment variable for the production and build your project with ng build --prod before shipping it to firebase

See https://angular.io/guide/build for details

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM