Deploy Your Angular App

Hi Friends, This is Lakshman here.

As part of the Series "Angular Best Practices".

Today, We will go through Thinks to know about Deploy Your Angular App

Deployment

We are always required to deploy our angular application somewhere for Testing, UAT & Production.

Before that we need to know the options for deployment right, they are,

  • Web App
  • NgInx

In this blog we will try to explore options to deploy as a Web App.

If you want to deploy like as WebSite with Build, it won't support by default we need to add Web.Config File to support angular app.

That Web.Config File will look like below,

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Angular" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="/" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

As Angular App is SPA, it has various options to Deploy, such as

  1. Azure Static Web Site.
  2. Using Storage Account Blobs.
  3. Azure Web App.
  4. AWS S3 Bucket.
  5. AWS Elastic Beanstalk.
  6. GCP Cloud Storage, etc.,

On-road head, we will discuss a lot of things.

Looking forward to your comments and share your feedback.

Until that, I am Lakshman, Signing Off.

Comments

Popular posts from this blog

Model Mapper in Angular

Implement Logging in Angular with Firebase

Dockerize Angular App for Dev