How to deploy Angular 7 Universal application to IIS - iis

I already working on an angular 7 project we just use ng build --prod to create a production build and just copy the content of the dist folder to IIS folder and it works fine. Now I have make this application universal using #ng-toolkit/universal its working fine on my local machine now I have to deploy this application to IIS server. So what we need to copy to IIS folder as now we have two sub folders inside dist folder one for "browser" and one for "Server" and server.js file in the dist folder. m confused which content should I copy to IIS folder and make it work. I have deployed the whole dist folder but it doesn't seem to work. I have created the production build using the following command.
"npm run build:prod"

Related

How to publish an aurelia project in IIS

I am publishing my Aurelia project in Azure from VS Code without problems but I don't know how to publish it in an IIS
regards
1.open command prompt as administrator.
2.enter to the Aurelia project folder.
3.run au build --env prod command to build project.
4.this command will generate a dist folder under the project folder.
5.now open iis.
6.right click on the server name and select add website.
7.feel the detail like site name, port number, and the path.
note: select the dist folder as a website path.
8.after creating site. select site name then click on browse from the cation pane.
refer this article for more detail:
https://discourse.aurelia.io/t/publish-aurelia-project-with-visual-studio-2017/2944
Deploying an aurelia.cli built app
I have execute au build --watch and I have copied and pasted the files generated in the wwwroot folder (in my case) inside the folder of my IIS web site and all works fine
Thanks

How to setup production environment for Vue and deploy app into environment

I have developed a Vue app and trying to build a dev/QA/PROD environment for the same. I knew that when i use 'npm run build', it will create dist folder with set of files/folders under it. Here i just want to know following things
What would be the minimal Server/Environment to execute dist files.?Is node setup enough to execute and how?
How to deploy dist folder to specific environment?Will it be through Git?
Any web technology that can serve static files would do the trick.
The index.html file contained in the dist folder has links to all the javascript, css, images necessary for your app to function correctly.
So your web server has to serve index.html, and the other files have to be located in a folder accessible from any client online.
With node you can do as explained here:
https://expressjs.com/en/starter/static-files.html
You can also use your github account and github pages:
https://www.youtube.com/watch?v=2MsN8gpT6jY

How can I combining Webpack project output with Asp.Net project output in VSTS build?

My repository contains an Asp.Net app, and a React app in seperate folder. I need to do a deployment to an Azure App service from a VSTS release.
Repository Root
MyAspNetApp
MyReactApp
The Asp.Net application is an MVC application. If it detects you on mobile it servers up the react app.
The react app is built using WebPack. When you do a production build, it copies the output into a folder called 'app' in the MyAspNetApp project. The production build can be run via 'npm run build-prod'.
When I was doing git deployments (kudu), I just added a command to the deploy.cmd to call 'npm install' and 'npm run build-prod'. Then another command to copy those files to the root of the deployment directory ('wwwroot').
Now that I am using VSTS to build and deploy (separate steps), I can't figure out how to get that 'app folder into wwwroot. In a build step I tried taking the stuff from the 'app' folder and putting it in an artifact called 'mobile'. Then in a deployment step, using a 'Copy Files' step to copy the 'mobile' artifact to $(build.artifactstagingdirectory)/app, but they don't show up in wwwroot on azure.
What am I missing here?
edit: cross posted here in MS VS Community site in hopes of getting a response. I will update this post if I get an answer there.
With Azure App Service Deploy task, if you check Publish using Web Deploy option, you need to put all necessary files in a zip file and specify this file in Package or folder input box.
You also can uncheck Publish using Web Deploy option and specify the root folder path of app.
Refer to these steps to do it:
Publish MVC application with File System publish method through Visual Studio build task
Run NPM commands to build React app through NPM task
Copy react app’s built files to necessary folder of MVC app deployed folder
(optional) Zip folder through Archive Files if you want to publish using web deploy
Add Azure App Service Deploy task (can be in release) and specify package or folder.

How to deploy a node.js application to heroku that lies within a subfolder of a repository

I'm unsure how to deploy my web application to heroku where the actual web application is generated within a sub folder. I have the project tree:
app
assets
dist
server
// other stuff ....
now when I want to run my server & frontend, I do gulp. gulp creates a folder named build which contains all needed files for running the web app, so my file tree would become
app
assets
dist
server
build
// other stuff ....
Is there a way to initialize the heroku repository to only the folder build? Since my actual web app lies inside just that folder, it's probably easier for me to only have heroku think the build folder exists.
I currently have heroku setup with only heroku create inside the parent repo
I found a solution to my issue. What I decided to do was include my build folder into my repository (did not add much bloat, only like 50kb). Then, when I wanted to deploy to heroku I did:
git subtree split --prefix build -b deploy
git push heroku deploy:master
git branch -D deploy
this created a branch with only the build folder, pushed that to heroku (use -f if you need to overwrite previous commits), the deleted the deploy branch.
Worked like a charm!

How to Deploy angular 2 CLI project in ubuntu production server hosted locally

Im am building a locally hosted ubuntu server. I want to deploy Angular 2 cli project on this server. im a newbie to angular 2. kindly help
The following will build your project and take care of minification, etc...
ng build --prod
That will generate a folder called "dist" - you can simply take the contents of that and copy them to your /var/www (or whatever the root of your webserver is)

Resources