0
votes

I have an angular application(9) back-end(python) which is needed to be deployed to the server. But i am not able to do that, I have used ng-build command to build file which is created inside in dist folder which has .js file with over 30 mb. When I uploaded the dist folder to the server, It is not working. Angular app is working fine in local server. Hosting server :fastcomet. I want to know the proper steps to host the angular application to server

1

1 Answers

0
votes

You need to use any web server apache or nginx. nginx block eg:

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /var/www/html/generated_angular_dist_folder;
        index index.html index.htm index.nginx-debian.html;

        server_name domain-name-tld;

        location / {
                try_files $uri $uri/ =404;
        }
}