第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

在Linux上同時執(zhí)行多個npm自定義的命令,兩個命令都是啟動Node站點(diǎn)。并且在后臺運(yùn)行

在Linux上同時執(zhí)行多個npm自定義的命令,兩個命令都是啟動Node站點(diǎn)。并且在后臺運(yùn)行

冉冉說 2019-05-13 07:56:06
"start-client":"cross-envNODE_ENV=productionnode./server/index.js","start-api":"cross-envNODE_ENV=productionnode./server/api/index.js","start-pro":"concurrently\"npmrunstart-client\"\"npmrunstart-api\""以上的npmrunstart-pro在linux上直接運(yùn)行是可以跑起來的,但是關(guān)掉當(dāng)前會話之后服務(wù)就存在了也就關(guān)閉了。當(dāng)我執(zhí)行npmrunstart-pro&這個命令的時候,也正常的跑起來了,當(dāng)我關(guān)閉會話之后,站點(diǎn)出現(xiàn)了503的錯誤,使用lsof-i:8080和lsof-i:8686查看端口是否存在,發(fā)現(xiàn)8080的端口不存在,但是8686的后端端口還存在。然后就放棄了這種操作。當(dāng)我執(zhí)行nohupnpmrunstart-pro&這個命令的時候,在項(xiàng)目的根目錄出現(xiàn)了nohup.output的文件,里面記錄了錯誤:>p2@0.1.0start-pro/website/pgyer>concurrently"npmrunstart-client""npmrunstart-api"events.js:160thrower;//Unhandled'error'event^Error:EBADF:badfiledescriptor,readatError(native)npmERR!codeELIFECYCLEnpmERR!errno1npmERR!p2@0.1.0start-pro:`concurrently"npmrunstart-client""npmrunstart-api"`npmERR!Exitstatus1npmERR!npmERR!Failedatthep2@0.1.0start-proscript.npmERR!Thisisprobablynotaproblemwithnpm.Thereislikelyadditionalloggingoutputabove.npmERR!Acompletelogofthisruncanbefoundin:npmERR!/root/.npm/_logs/2018-07-18T00_30_14_968Z-debug.log再次想辦法,使用先執(zhí)行nohupnpmrunstart-api&提示成功!在執(zhí)行nobupnpmrunstart-client&也執(zhí)行成功!本人比較強(qiáng)迫癥,在這里想問一下,如何能一條命令一下執(zhí)行npmrunstart-api和npmrunstart-client有什么方法嗎?
查看完整描述

2 回答

?
眼眸繁星

TA貢獻(xiàn)1873條經(jīng)驗(yàn) 獲得超9個贊

//package.json
"script":{
"start-client":"cross-envNODE_ENV=productionnode./server/index.js",
"start-api":"cross-envNODE_ENV=productionnode./server/api/index.js",
"start-all":"npmrunstart-client&&npmrunstart-api"
}
npmrunstart-all
                            
查看完整回答
反對 回復(fù) 2019-05-13
  • 2 回答
  • 0 關(guān)注
  • 1500 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號