Cov txheej txheem:

Kuv yuav siv lub node js app ntawm Azure li cas?
Kuv yuav siv lub node js app ntawm Azure li cas?

Video: Kuv yuav siv lub node js app ntawm Azure li cas?

Video: Kuv yuav siv lub node js app ntawm Azure li cas?
Video: Merging PDFs with Python! 2024, Kaum ib hlis
Anonim

Hauv AZURE APP SERVICE explorer ntawm VS Code, xaiv lub xiav nce xub icon rau xa mus koj app rau Azure . (Koj tuaj yeem thov tib cov lus txib los ntawm Command Palette (Ctrl + Ua haujlwm + P) los ntawm kev ntaus ' xa mus rau web app ' thiab xaiv Azure App Kev Pabcuam: Muab tso rau rau Web App ). Xaiv qhov nodej -docs-nyob zoo-world folder.

Ib sab ntawm no, kuv yuav xa mus rau Azure App Service li cas?

Kev xaiv 1: Siv App Service tsim kev pabcuam

  1. Hauv Azure portal, nrhiav thiab xaiv App Services, thiab tom qab ntawd xaiv lub vev xaib app koj xav xa mus.
  2. Ntawm nplooj ntawv app, xaiv Deployment Center hauv cov ntawv qhia zaub mov sab laug.
  3. Xaiv koj qhov chaw tswj xyuas qhov chaw tso cai ntawm nplooj ntawv xa mus rau Chaw Xa Khoom, thiab xaiv Mus Ntxiv.

Ib yam li ntawd, kuv yuav siv lub node server li cas? Deploying Node Applications

  1. Kauj ruam 1: Tsim cov ntaub ntawv "package.json" siv cov lus txib nram qab no npm init.
  2. Kauj ruam 2: Tsim cov ntaub ntawv hu ua "app.js" hauv koj qhov project folder.
  3. Kauj ruam 3: Tsim ib cov ntaub ntawv html “head.html”
  4. Kauj ruam 4: Tsim lwm cov ntaub ntawv html “tail.html”
  5. KAUJ RUAM 5: Qhib "app.js" cov ntaub ntawv tsim nyob rau hauv kauj ruam 2 thiab luam paste cov cai hauv qab no hauv nws.

Hais txog qhov no, kuv yuav ua li cas khiav node ntawm Azure?

Npaj Azure los khiav lub Node uas twb muaj lawm. js Application

  1. Hauv Azure portal, xaiv "App Services" los ntawm cov ntawv qhia zaub mov.
  2. Nyem qhov "Add" khawm.
  3. Xaiv qhov "Web App" kev xaiv los ntawm lub gallery.
  4. Nyem "Tsim"
  5. Sau cov nram qab no:
  6. Kos qhov "Pin rau dashboard" kev xaiv.
  7. Nyem "Tsim"

Kuv yuav luam tawm kuv azure code li cas?

Yuav Ua Li Cas Ntshuam Ib Daim Ntawv Tshaj Tawm los ntawm Azure

  1. Hauv Azure portal, mus rau lub dashboard ntawm koj lub vev xaib.
  2. Hauv WebMatrix, qhib qhov chaw koj xav tshaj tawm.
  3. Nyem qhov Publish khawm.
  4. Yog tias qhov no yog thawj zaug koj tau tshaj tawm, koj yuav raug ceeb toom kom nkag mus rau tej thaj chaw deb chaw.
  5. Nyem Yes txhawm rau khiav qhov kev txheeb xyuas kev sib raug zoo.

Pom zoo: