Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
deploying_angular.pdf
Search
John Papa
March 02, 2018
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
deploying_angular.pdf
John Papa
March 02, 2018
More Decks by John Papa
See All by John Papa
Choosing Your JavaScript Framework
johnpapa
1
140
Readable Code
johnpapa
7
2.6k
Building Rich Apps with AngularJS on ASP.NET
johnpapa
6
18k
Gulp and Grunt
johnpapa
20
12k
Angular and WIP: Progressive Saving
johnpapa
3
12k
KnockoutJS and MVVM with JavaScript - TechED 2013
johnpapa
1
850
Single Page Applications with Microsoft ASP.NET
johnpapa
1
500
Single Page Apps
johnpapa
3
14k
KnockoutJS TechEd NA 2012
johnpapa
3
4.3k
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
370
So, you think you're a good person
axbom
PRO
2
2.1k
ラッコキーワード サービス紹介資料
rakko
1
4.6M
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
490
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Side Projects
sachag
455
43k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
700
The Limits of Empathy - UXLibs8
cassininazir
1
620
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
490
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Transcript
To the Cloud ! @john_papa John Papa Developer Advocate, Microsoft
Going to the cloud is easier with great tooling @john_papa
Optimize @john_papa
Build Optimize @john_papa
Deploy Build Optimize @john_papa
Building Angular @john_papa
Scaffold a new Angular App ng new my-app @john_papa
Add routing Set your prefix Define your styles Verify the
flle names This is just the beginning ng new my-app --routing --prefix ma --style scss --dry-run Scaffold a new Angular App @john_papa
$ ng build Development build Consider the Personas When we
Build $ ng build --prod --build-optimizer Production builds Minified, optimized, cache busting @john_papa
Environment environment.prod.ts ng build --prod --build-optimizer Cache-busting all build files
Source maps not generated Uglification yes Bundling yes environment.ts ng build only images referenced in css generated no yes Code Splitting yes AOT yes yes no Tree Shaking yes no @john_papa
The Angular CLI makes production builds smaller and faster @john_papa
Tools to Analyze and Optimize $ ng build --prod --stats-json
$ webpack-bundle-analyzer dist/stats.json Generate webpack statistics Analyze the statistics Optimized build with source maps Analyze the source $ ng build --prod --sm $ source-map-explorer dist/main.xxx.js https://www.npmjs.com/package/source-map-explorer https://www.npmjs.com/package/webpack-bundle-analyzer @john_papa
Webpack Bundle Analyzer
CLI Deploy to Azure @john_papa
@john_papa
Deploy the Node App to Azure @john_papa https://aka.ms/jp-vikings-azwebapp $ az
webapp new –n vikings-rule
Easy Deploy @john_papa
Do the versions of Node match, both locally and in
the cloud? @john_papa
Automate the build and deploy steps with consistency and confidence
@john_papa
Debugging Node.js in Docker with VS Code @john_papa
Dockerfile @john_papa
Dockerfile 1 Self contained script @john_papa
Dockerfile 2 1 Provides a recipe for creating and running
our app Self contained script @john_papa
Dockerfile 3 2 1 Configurable to adapt to different environments
Provides a recipe for creating and running our app Self contained script @john_papa
Sample Dockerfile Sigh. @john_papa
Generate Docker files @john_papa
Generate Docker files https://aka.ms/docker-code VS Code can do that! @john_papa
Multi-stage Docker files? @john_papa https://aka.ms/ng-essentials Angular Essentials Extension for VS
Code
Running Angular in Docker Create Dockerfile @john_papa
Running Angular in Docker Build and Run Create Dockerfile @john_papa
Debug Build and Run Running Angular in Docker Create Dockerfile
@john_papa
Debugging Docker Apps @john_papa
Get Your Docker Inside VS Code ! @john_papa https://aka.ms/docker-code
Tag, Run, Push from VS Code @john_papa https://aka.ms/docker-code
To the Cloud! @john_papa
Docker to the Cloud Compose @john_papa
Docker to the Cloud Tag Compose @john_papa
Docker to the Cloud Push Tag Compose @john_papa
Docker to the Cloud Push Tag Compose Web App in
the Cloud @john_papa
Docker to the Cloud @john_papa
Key Points 3 2 1 @john_papa
Key Points JavaScript CLIs optimize the builds 3 2 1
@john_papa
Key Points Docker makes it run “everywhere” JavaScript CLIs optimize
the builds 3 2 1 @john_papa
VS Code tooling makes it all easier Key Points Docker
makes it run “everywhere” JavaScript CLIs optimize the builds 3 2 1 @john_papa
Great Tools Make Deployment You Better @john_papa
https://github.com/johnpapa/vikings https://aka.ms/ng-essentials https://aka.ms/vsc-node https://aka.ms/jp-viking-azdeploy https://aka.ms/jp-free @john_papa