简体   繁体   中英

How to deploy generate multiple dist folders in angular app?

I have an angular application that includes a separate folder of a an express server , I want to deploy both the angular app and the server inside it to Azure , for that purpose I need to generate two dist folders that will be deployed simultaneously on Azure. How can I generate two dist folders ?

Here is my code structure :

在此处输入图片说明

Depending on how your application is designed, you have the following options

  • Regular Angular App
    For the standard scenario, you have 2 ways to go about this

    1. Deploy Angular bits to blob storage as a static website
      This is something I would recommend considering that your static assets (compiled js, css, html, etc.) would be served from very high performance servers and top of that, you could drive request through Azure CDN for global scale and really low latencies.
    2. Deploy Angular bits along with your express app
      This is a simpler deployment requiring you to have your express app serve the angular built files as static files .

      BONUS: Do consider making your app a PWA for a much better user experience which can also be served as static content and allows your app to work offline as well

  • Server Side Rendered Angular App
    I guess this isn't what you have but if you do, then its a matter of just deploying the app is.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM