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
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
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
From π to Pie charts
rasagy
0
230
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
410
Utilizing Notion as your number one productivity tool
mfonobong
4
350
Why Our Code Smells
bkeepers
PRO
340
58k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
340
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
GraphQLとの向き合い方2022年版
quramy
50
15k
The untapped power of vector embeddings
frankvandijk
2
1.8k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
Are puppies a ranking factor?
jonoalderson
1
3.7k
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