angular - How to deploy an Angular2 + Webpack app on Azure? -


i'm trying find information online how deploy angular2 webpack app azure, couldn't find helpful enough. checked start package suggested here how deploy angular 2 apps? couldn't find there.

so, have angular2 app running webpack locally. it's working locally. how deploy azure web apps?

i appreciate :)

thanks!

well, able working. after researching found out there few options go by, creating own local prod build , uploading , using cd/ci. went latter. took quite time, it's set don't have worry anymore...

i based myself in tutorial http://tattoocoder.com/angular2-azure-codeship-angularcli/ shane boyer since link-only answers discouraged i'm going write here.

here's how did it:

  1. create branch release on github (i use 1 publish)
  2. create free account on codeship , import github repo enter image description here enter image description here

  3. on configure project select i want create custom commands , use code: enter image description here

nvm install 4.1

npm install angular-cli

npm install

  1. then 1 under test pipeline: enter image description here

ng serve &

ng e2e

ng build -prod

  1. click save , go dashboard
  2. now go azure portal (https://portal.azure.com/) , open/create web app
  3. click on deployment options > choose source > local git repository enter image description here
  4. then click on deployment credentials , insert user/password prefer enter image description here
  5. click on overview , copy git clone url enter image description here
  6. go project settings > environment variables , add azure_repo_url value being git clone url copied user/password (https://username:password@site.scm.az(...).git): enter image description here enter image description here
  7. after, click on deployment on left navigation menu
  8. choose branch want deploy (in case release) , click save, click on custom script enter image description here
  9. then customize , add script:
git config --global user.email "email@provider.com" git config --global user.name "your name"  git clone $azure_repo_url repofolder  cd repofolder  rm -rf *  cp -rf ~/clone/dist/* . git add -a git commit --all --author "$ci_committer_name <$ci_committer_email>" --message "$ci_message ($ci_build_url)"  git push origin master 

that it. every time push github codeship build code , every time pr release build , publish azure.

thank https://stackoverflow.com/users/595213/shayne-boyer this.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -