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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
John Papa
March 02, 2018
120
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
120
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
840
Single Page Applications with Microsoft ASP.NET
johnpapa
1
490
Single Page Apps
johnpapa
3
14k
KnockoutJS TechEd NA 2012
johnpapa
3
4.3k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
210
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Code Review Best Practice
trishagee
74
20k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
790
A better future with KSS
kneath
240
18k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Unsuck your backbone
ammeep
672
58k
Deep Space Network (abreviated)
tonyrice
0
210
The Curious Case for Waylosing
cassininazir
1
400
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