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
110
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
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
590
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
720
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
A Tale of Four Properties
chriscoyier
163
24k
The Curious Case for Waylosing
cassininazir
1
390
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
480
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
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