DEV Community

unixnag
unixnag

Posted on

Angular App Deployment

Build Angular App for Production

while you plan for production release then keep these things in Mind

ng build --prod --base--href /vdname/

above command will create a production build in your app folder . a dist folder will be added in your app folder with name "dist".

This dist folder will have all build files .

Note1 : keep in mind that vdname and your actual vd name where you will do the deployment always will be the same .
suppose your hosting address is http://www.xafdeveloper.blogspot.com
then while making build you need to create build like this .

ng build --prod --base--href /xafdeveloper/

Note2: URL Rewrite extension need to install in IIS and you can download it from Microsoft site .

Note3: you need to add web.config file in your vd as by default angular build didn't create a "web.config" file .

you can create is by adding a text file and change its name and file type as config .
now copy url rewrite code from web and paste it in this file .
Now access your app and enjoy Angular Application Cheers !..
Note3. you can see base reference details in Index.html file also in your build folder

Follow on Shubh Techno Expert

@ShubhTechnoExpet on Facebook page .

Top comments (0)