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
130
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
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The SEO Collaboration Effect
kristinabergwall1
1
510
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
410
Done Done
chrislema
186
16k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
190
The Curious Case for Waylosing
cassininazir
1
430
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Ethics towards AI in product and experience design
skipperchong
2
330
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
350
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