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
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;
}
}
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.