Cov txheej txheem:

Yuav ua li cas kuv txwv Ng pab rau Mac?
Yuav ua li cas kuv txwv Ng pab rau Mac?

Video: Yuav ua li cas kuv txwv Ng pab rau Mac?

Video: Yuav ua li cas kuv txwv Ng pab rau Mac?
Video: yuav coj li cas kom luag nyiam 2024, Kaum ib hlis
Anonim

Ntawm macOS Mojave 10.14. 4, koj tuaj yeem sim Command? + Q hauv lub davhlau ya nyob twg. Cov lus txib killall tuaj yeem siv los xa cov teeb liab mus rau ib qho txheej txheem los ntawm kev siv nws lub npe. Nws txhais tau tias yog tias koj muaj tsib versions ntawm tib qhov kev pab cuam khiav, killall command yuav tua tag nrho tsib.

Cov neeg tseem nug, Kuv yuav ua li cas thiaj li tawm ntawm NG pab?

Yog koj xav tawm ng pab , koj yuav tsum siv Ctrl + C hloov, uas tseem yuav tso tawm 4200 chaw nres nkoj. Peb tuaj yeem yuam tua qhov chaw nres nkoj los ntawm kev ua raws li cov lus txib. Nrhiav PID ntawm cov txheej txheem uas koj xav tua.

Kuv yuav ua li cas khiav NG pab ntawm lwm qhov chaw nres nkoj?

  1. Rau qhov mus tas li: Goto nodel_modules/angular-cli/commands/server. js Nrhiav rau var defaultPort = txheej txheem. env. PORT || 4200; thiab hloov 4200 rau lwm yam uas koj xav tau.
  2. Txhawm rau khiav tam sim no: ng pab --port 4500 (Koj hloov 4500 rau txhua tus lej koj xav siv ua koj qhov chaw nres nkoj)

Yog li ntawd, kuv yuav kaw NPM server hauv Terminal Mac li cas?

Yog li kom xaus koj tuaj yeem tawm los ntawm:

  1. Kev ntaus ntawv. tawm hauv nodejs REPL.
  2. Nias -C ob zaug.
  3. nias -D.
  4. txheej txheem. exit(0) txhais tau tias ib qho kev tawm ntawm REPL. Yog tias koj xav rov qab lwm yam xwm txheej koj tuaj yeem xa rov qab tus lej tsis yog xoom.
  5. txheej txheem. tua(process.

ng build--prod ua dab tsi?

ua build --env=prod / ua build --configuration=prod yuav hloov qhov project configuration mus rau configurations teem nyob rau hauv ib puag ncig. prod. ts file. Nws yuav tsis yog ua ib qho AOT, minification thiab lwm yam.

Pom zoo: