Tuesday, February 28, 2023

Re: How can I serve an Angular app from root?

Hi,

You shouldn't be serving your angular application that way. Running it in development, you run it and serve it from the "ng serve" command. Running in production, you need to have a webserver in front of your application any way, and should serve the angular files from the webserver.

Med vänliga hälsningar,

Andréas


Den sön 26 feb. 2023 kl 21:22 skrev Zayd Krunz <zaydkrunz@gmail.com>:
Hello,
I have a prebuilt Angular app, which is basically just static files. How can I serve it from the root project? If I set STATIC_URL to "/", I get the following:

django.core.exceptions.ImproperlyConfigured: runserver can't serve media if MEDIA_URL is within STATIC_URL.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/60f7e50e-7900-46f1-a91e-67038ea91e30n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK4qSCdKVjmtThYiKdQnRTYe9PEP-5Smee2LWfqUq7_edLC81Q%40mail.gmail.com.

No comments:

Post a Comment