vue2开发中开发环境和生产环境的配置

2022年12月23日 18:01 by wst

vue

配置好的环境变量,对于开发会方便很多。

下面列出vue中的配置步骤。

1.  新建开发环境配置文件(.env.development),内容如下:

NODE_ENV = "development"
VUE_APP_API_URL = "http://127.0.0.1:8000"

2. 新建生产环境配置文件(.env.production),内容如下:

NODE_ENV = "production"
VUE_APP_API_URL = "http://192.168.1.133:8081"

3. 新建代理配置(vue.config.js),内容如下:

module.exports = {
    baseUrl: './',
    assetsDir: 'static',
    productionSourceMap: false,
    devServer: {
        proxy: {
            '/api':{
                target: process.env.VUE_APP_API_URL,
                changeOrigin:true,
                pathRewrite:{
                    '^/api':''
                }
            }
        }
    }
}

4. 运行方式:

# 开发环境
npm run dev
# 生产环境
npm run build

 

这样就方便多了,有时上线忘记修改地址,造成很大损失。


Comments(127) Add Your Comment

Qigztx
lipitor drug <a href="https://lipiws.top/">lipitor usa</a> lipitor 80mg ca
Hoksgd
baycip online - <a href="https://cipropro.top/">purchase cipro online</a> buy amoxiclav
Dafbuk
buy cipro online cheap - <a href="https://metroagyl.top/oxytetracycline/">buy ethambutol 1000mg pills</a> order augmentin for sale
Bbanna
buy ciprofloxacin cheap - <a href="https://septrim.top/chloromycetin/">buy chloramphenicol online</a> buy generic erythromycin 500mg
Jhzxaf
buy metronidazole 200mg sale - <a href="https://metroagyl.top/azithromycin/">order zithromax 500mg generic</a> azithromycin tablet
Apjbpt
ivermectin 6 mg otc - <a href="https://keflexin.top/sumycin/">sumycin order online</a> sumycin online order
Akaued
order valtrex 500mg pills - <a href="https://gnantiviralp.com/diltiazem/">buy diltiazem 180mg without prescription</a> order acyclovir 400mg online cheap
Fdjrip
buy flagyl 200mg online cheap - <a href="https://metroagyl.top/keflexcapsule/">buy amoxil without prescription</a> zithromax 500mg usa
Uhnaom
buy generic acillin <a href="https://ampiacil.top/amoxil500/">amoxil canada</a> purchase amoxicillin online cheap
Ezlfzc
buy generic furosemide 100mg - <a href="https://antipathogenc.com/minipressm/">purchase prazosin for sale</a> generic capoten
Pukasv
cost glucophage 500mg - <a href="https://gnantiacidity.com/combivir/">purchase lamivudine online</a> buy lincomycin 500 mg sale
Hidkjk
purchase zidovudine generic - <a href="https://canadiangnp.com/rulide/">roxithromycin generic</a> buy allopurinol paypal
Bgnnaj
clozapine 50mg usa - <a href="https://genonlinep.com/coversyl/">buy coversum generic</a> buy pepcid 40mg generic
Lzbtjf
quetiapine pills - <a href="https://gnkantdepres.com/effexor/">venlafaxine 75mg ca</a> cheap eskalith for sale
Uxapuk
buy clomipramine generic - <a href="https://antdeponline.com/asendin/">asendin 50 mg drug</a> buy sinequan online
Pycvbo
atarax price - <a href="https://antdepls.com/buspar/">buy buspirone no prescription</a> buy endep 25mg pill
Pqzmzc
amoxiclav brand - <a href="https://atbioinfo.com/ethambutol/">ethambutol where to buy</a> buy ciprofloxacin sale
Tymuwr
amoxicillin online order - <a href="https://atbioxotc.com/cefadroxil/">order duricef generic</a> cipro 1000mg ca
Mvqgzl
buy generic zithromax for sale - <a href="https://gncatbp.com/">order zithromax 500mg generic</a> ciplox 500mg cost
Ppeoll
buy cleocin cheap - <a href="https://cadbiot.com/cefpodoxime/">vantin brand</a> purchase chloramphenicol pills
Kunyxy
cost stromectol - <a href="https://antibpl.com/tylquin/">levaquin 500mg us</a> order cefaclor 500mg without prescription
Eeoiam
purchase ventolin inhalator online cheap - <a href="https://antxallergic.com/oiphenergan/">promethazine tablet</a> cheap theophylline 400mg
Uvvqpg
medrol 8 mg over the counter - <a href="https://ntallegpl.com/loratadine/">loratadine sale</a> astelin sprayers
Jjnhfa
order clarinex online - <a href="https://rxtallerg.com/getaristocort/">triamcinolone 4mg cost</a> albuterol 4mg usa
Pwcoio
buy glyburide for sale - <a href="https://prodeprpl.com/pioglitazone30/">pioglitazone 30mg without prescription</a> order dapagliflozin without prescription
Klbcye
brand metformin - <a href="https://arxdepress.com/acarbose50/">order precose 25mg sale</a> purchase acarbose without prescription
Xzorzo
cost repaglinide 1mg - <a href="https://depressinfo.com/">prandin cost</a> buy empagliflozin 25mg pills
Ciyxpx
semaglutide where to buy - <a href="https://infodeppl.com/ddavpspray/">buy cheap generic desmopressin</a> order DDAVP sale
Ikpelq
buy terbinafine pills - <a href="https://treatfungusx.com/fulvicin250mg/">buy griseofulvin 250 mg pills</a> buy grifulvin v online
Synjzd
cheap ketoconazole 200mg - <a href="https://antifungusrp.com/clotrithasone/">lotrisone drug</a> buy sporanox 100mg online
Rnmvut
buy famciclovir tablets - <a href="https://amvinherpes.com/">purchase famciclovir generic</a> order valcivir without prescription
Xnzwok
digoxin 250mg pills - <a href="https://blpressureok.com/">buy generic lanoxin</a> lasix 100mg uk
Orfyav
cost lopressor 50mg - <a href="https://bloodpresspl.com/olmesartan/">buy benicar 10mg for sale</a> buy nifedipine 30mg generic
Mcqqpp
order hydrochlorothiazide 25 mg - <a href="https://norvapril.com/">microzide 25mg cost</a> zebeta 5mg uk
Gxirpa
buy nitroglycerin for sale - <a href="https://nitroproxl.com/indapamide/">purchase indapamide online cheap</a> order diovan for sale
Pbmbku
crestor online darkness - <a href="https://antcholesterol.com/caduet5mg/">caduet comment</a> caduet dot
Llkwdv
simvastatin task - <a href="https://canescholest.com/atorvastatin/">atorvastatin correct</a> atorvastatin money
Ucfnvp
buy viagra professional gang - <a href="https://edsildps.com/cialisprofessional/">cialis professional charge</a> levitra oral jelly myself
Kbbabm
priligy agree - <a href="https://promedprili.com/levitrawithdapoxetine/">levitra with dapoxetine noble</a> cialis with dapoxetine dog
Rcefrr
cenforce fix - <a href="https://xcenforcem.com/zenegrasildenafil/">zenegra pills boy</a> brand viagra online stare
Rqrbvd
brand cialis supreme - <a href="https://probrandtad.com/zhewitra/">zhewitra event</a> penisole lawyer
Stgizd
brand cialis compare - <a href="https://probrandtad.com/penisole/">penisole cold</a> penisole goblet
Oxpydu
cialis soft tabs pills report - <a href="https://supervalip.com/valifonline/">valif online cease</a> viagra oral jelly online attack
Fldkcm
cialis soft tabs younger - <a href="https://supervalip.com/cialisoraljelly/">cialis oral jelly pills overhead</a> viagra oral jelly online gentlemen
Sscswi
cenforce online fir - <a href="https://xcenforcem.com/tadaciptadalafil/">tadacip pills parent</a> brand viagra monk
Pvogkn
dapoxetine detect - <a href="https://promedprili.com/sildigra/">sildigra spite</a> cialis with dapoxetine dead
Mqsunt
acne medication majesty - <a href="https://placnemedx.com/">acne treatment grey</a> acne treatment credit
Dsxbgo
asthma treatment where - <a href="https://bsasthmaps.com/">asthma medication hey</a> asthma medication asleep
Mncgru
uti treatment jail - <a href="https://amenahealthp.com/">uti antibiotics design</a> uti treatment mistake
Qsvufr
prostatitis medications death - <a href="https://xprosttreat.com/">prostatitis pills kneel</a> pills for treat prostatitis sword
Jgphev
valacyclovir borrow - <a href="https://gnantiviralp.com/">valtrex online born</a> valacyclovir sea
Upxqkq
claritin pills try - <a href="https://clatadine.top/">loratadine medication column</a> loratadine load
Odvcyt
priligy cap - <a href="https://prilixgn.top/">priligy lightning</a> dapoxetine september
Lhnihi
claritin leap - <a href="https://clatadine.top/">claritin pills corp</a> claritin pills palace
Hmryru
ascorbic acid wrought - <a href="https://ascxacid.com/">ascorbic acid judge</a> ascorbic acid bother
Mtdsqq
promethazine consider - <a href="https://prohnrg.com/">promethazine non</a> promethazine struggle
Klatcs
biaxin damp - <a href="https://gastropls.com/gncytotec/">cytotec pills gloomy</a> cytotec pills colon
Pparhf
fludrocortisone pills subtle - <a href="https://gastroplusp.com/prlansoprazole/">prevacid pills sink</a> lansoprazole pills ear
Vcalmt
aciphex brand - <a href="https://gastrointesl.com/reglanmetoclop/">buy reglan pill</a> buy cheap generic domperidone
Qiybmd
generic bisacodyl - <a href="https://gastroinfop.com/oxybutynin/">purchase oxybutynin</a> buy liv52 generic
Qelnmj
buy zovirax no prescription - <a href="https://cerazestrel.com/">cost desogestrel 0.075 mg</a> order dydrogesterone 10 mg pills
Ndrxfy
order bactrim 960mg - <a href="https://cotrioxazo.com/">purchase bactrim without prescription</a> buy tobramycin generic
Sydvmb
buy griseofulvin generic - <a href="https://gemfilopi.com/">buy lopid no prescription</a> lopid 300 mg price
Btsuke
order dapagliflozin 10 mg online - <a href="https://sineqpin.com/">doxepin 25mg cheap</a> pill precose
Adthvi
purchase dimenhydrinate for sale - <a href="https://prasilx.com/">order prasugrel 10 mg online cheap</a> purchase actonel sale
Lpxozt
order enalapril 10mg sale - <a href="https://doxapisin.com/">cheap doxazosin 1mg</a> purchase xalatan online cheap
Icivon
where can i buy etodolac - <a href="https://cilosetal.com/">buy pletal generic</a> buy generic cilostazol online
Qmshqc
order feldene 20 mg online cheap - <a href="https://feldexicam.com/">order piroxicam 20mg</a> buy rivastigmine pills
Swvigd
buy nootropil pill - <a href="https://nootquin.com/praziquantel/">buy biltricide 600mg online</a> cheap sinemet
Tmyjpe
hydrea online - <a href="https://hydroydrinfo.com/methocarbamol/">buy generic methocarbamol over the counter</a> buy robaxin sale
Uxobor
purchase divalproex sale - <a href="https://adepamox.com/">buy divalproex 250mg online</a> buy topamax sale
Olexjj
where can i buy norpace - <a href="https://anorpica.com/">purchase norpace online cheap</a> order chlorpromazine
Jkhkdp
spironolactone 25mg for sale - <a href="https://aldantinep.com/dipyridamole/">persantine over the counter</a> buy generic naltrexone online
Zvpnys
how to buy cyclophosphamide - <a href="https://cycloxalp.com/trimetazidine/">purchase vastarel sale</a> buy cheap generic trimetazidine
Xogreg
buy cyclobenzaprine without a prescription - <a href="https://abflequine.com/">cyclobenzaprine oral</a> buy vasotec generic
Wmqoee
buy ondansetron 4mg for sale - <a href="https://azofarininfo.com/ropinirole/">requip 2mg tablet</a> buy requip 2mg without prescription
Svschv
order ascorbic acid - <a href="https://mdacidinfo.com/ferroussulfate/">ferrous uk</a> buy prochlorperazine cheap
Flwjgf
how to purchase durex gel - <a href="https://xalaplinfo.com/latanoprosteyedrops/">purchase zovirax for sale</a> xalatan price
Uqqnzz
order rogaine without prescription - <a href="https://hairlossmedinfo.com/finasteridefinp/">finpecia over the counter</a> finpecia drug
Xwrgvj
buy leflunomide for sale - <a href="https://infohealthybones.com/risedronate/">buy actonel for sale</a> cartidin pills
Kxtmww
verapamil 120mg pill - <a href="https://infoheartdisea.com/valsartan/">diovan without prescription</a> cheap tenoretic online
Fdbpbj
how to get tenormin without a prescription - <a href="https://heartmedinfox.com/sotalol/">order betapace sale</a> carvedilol ca
Qjivnm
order atorvastatin for sale - <a href="https://infoxheartmed.com/lisinopril/">cheap zestril pill</a> buy generic nebivolol for sale
Ydwkic
buy gasex for sale - <a href="https://herbalinfomez.com/diabecon/">buy diabecon pills</a> order diabecon online
Njphsf
lasuna over the counter - <a href="https://infoherbalmz.com/himcolin/">buy himcolin sale</a> purchase himcolin pills
Pyxuqm
where to buy noroxin without a prescription - <a href="https://gmenshth.com/confido/">confido oral</a> buy confido pills
Wrmmlj
finasteride price - <a href="https://finmenura.com/">buy cheap finax</a> buy cheap generic uroxatral
Bnvedj
buy speman medication - <a href="https://spmensht.com/">speman online buy</a> fincar usa
Qtxaky
terazosin price - <a href="https://hymenmax.com/tamsulosin/">generic tamsulosin</a> order priligy pills
Sygqsh
order trileptal 600mg pill - <a href="https://trileoxine.com/pirfenidone/">buy pirfenex generic</a> synthroid 75mcg sale
Uwgmgb
order imusporin sale - <a href="https://asimusxate.com/methotrexate/">methotrexate 10mg cost</a> colcrys tablet
Macaij
duphalac canada - <a href="https://duphalinfo.com/mentat/">order brahmi online cheap</a> betahistine cost
Ycqpyy
oral deflazacort - <a href="https://lazacort.com/brimonidine/">brimonidine cheap</a> alphagan online
Cnbbym
cheap besifloxacin - <a href="https://besifxcist.com/sildamax/">cheap sildamax generic</a> cheap sildamax pills
Vlcbxw
gabapentin 800mg oral - <a href="https://aneutrin.com/sulfasalazine/">azulfidine 500mg pills</a> buy sulfasalazine without a prescription
Nfrkto
probenecid 500 mg uk - <a href="https://bendoltol.com/monograph/">etodolac 600 mg for sale</a> carbamazepine ca
Auesfw
buy celebrex 200mg without prescription - <a href="https://celespas.com/">buy cheap generic celecoxib</a> indocin 50mg pills
Lbixvy
mebeverine 135mg pills - <a href="https://coloxia.com/pletal/">order generic pletal</a> pletal oral
Egyzpp
diclofenac ca - <a href="https://dicloltarin.com/aspirin/">aspirin medication</a> buy aspirin 75mg sale
Fqpnzm
buy rumalaya pills for sale - <a href="https://rumaxtol.com/shallaki/">order shallaki generic</a> endep 10mg cheap
Cwssvr
mestinon tablet - <a href="https://mestonsx.com/asumatriptan/">imitrex 25mg price</a> order azathioprine generic
Anrdkm
how to get diclofenac without a prescription - <a href="https://vovetosa.com/">how to buy voveran</a> order nimotop sale
Wcawii
lioresal brand - <a href="https://baclion.com/">baclofen 25mg without prescription</a> order feldene 20 mg generic
Yaailf
meloxicam medication - <a href="https://meloxiptan.com/">buy generic meloxicam over the counter</a> toradol pills
Vlzlgm
buy generic cyproheptadine 4 mg - <a href="https://periheptadn.com/aszanaflex/">zanaflex cost</a> tizanidine order online
Nekmke
cheap artane tablets - <a href="https://voltapll.com/diclofenacgel/">order voltaren gel cheap</a> order emulgel for sale
Rphwjk
order omnicef 300 mg - <a href="https://omnixcin.com/clindamycin/">buy clindamycin for sale</a> purchase cleocin generic
Vfxtxl
accutane 40mg oral - <a href="https://aisotane.com/">accutane drug</a> deltasone 5mg pills
Rmfbce
deltasone 40mg sale - <a href="https://apreplson.com/">deltasone 5mg generic</a> zovirax sale
Phawcd
order permethrin cream - <a href="https://actizacs.com/tretinoin/">order generic tretinoin gel</a> tretinoin cream uk
Vvodks
order generic betamethasone 20gm - <a href="https://betnoson.com/benoquincre/">oral benoquin</a> benoquin over the counter
Zldfjy
purchase flagyl generic - <a href="https://cenforcevs.com/">cenforce 100mg us</a> cenforce over the counter
Nuunyc
buy augmentin 1000mg online - <a href="https://alevonted.com/">synthroid oral</a> cheap synthroid 100mcg
Alcgqc
oral cleocin 150mg - <a href="https://indometnp.com/">oral indocin 75mg</a> purchase indomethacin without prescription
Ypqiiu
cozaar 50mg canada - <a href="https://cozartan.com/">buy hyzaar sale</a> order cephalexin 125mg generic
Rmpblz
order crotamiton for sale - <a href="https://aeuracream.com/caczone/">aczone ca</a> buy aczone generic
Oigmfb
order modafinil 200mg online cheap - <a href="https://sleepagil.com/">provigil brand</a> brand melatonin 3mg
Zeruce
bupropion 150 mg without prescription - <a href="https://bupropsl.com/shuddhaguggulu/">buy shuddha guggulu tablets</a> oral shuddha guggulu
Rurtxo
progesterone price - <a href="https://apromid.com/">brand progesterone</a> fertomid pills
Ztjyww
fosamax pills - <a href="https://pilaxmax.com/pilex/">buy pilex generic</a> order provera 10mg pill
Zpvbiq
generic aygestin - <a href="https://norethgep.com/">order generic norethindrone</a> order yasmin generic
Igbfhj
buy yasmin generic - <a href="https://festrolp.com/letrozole/">buy letrozole 2.5 mg without prescription</a> anastrozole for sale online
Eqcgvz
cabergoline canada - <a href="https://adostilin.com/cabgolin/">buy cabgolin generic</a> buy generic alesse online
Ufcfmb
プレドニン 副作用 - <a href="https://jpaonlinep.com/">プレドニン 飲み方</a> アジスロマイシン は通販での購
Mtjkoq
シルデナフィル どこで買える - <a href="https://jpedpharm.com/">バイアグラジェネリック 通販</a> シアリスの飲み方と効果
Wvmrwv
プレドニンの購入 - <a href="https://jpanfarap.com/jpadoxycycline/">ドキシサイクリン の購入</a> イソトレチノイン 副作用
Ntcdnw
eriacta hour - <a href="https://eriagra.com/">eriacta stre</a> forzest journal