簡體   English   中英

如何在 windows IIS 上使用 Angular 和 nodejs 托管 MEAN 堆棧應用程序

[英]How to host MEAN stack application with Angular and nodejs on windows IIS

我在前端有 angular,在后端有節點,我需要在 windows 服務器上運行兩者。 Angular 我可以在 IIS 中使用 URL 重寫托管,但對如何處理 nodejs 代碼感到困惑? 我應該通過 cmd 啟動 nodejs 代碼,然后在 IIS 上啟動 Angular 嗎? 另外,我應該如何在托管時保持 mongod.exe 啟動? 我想知道如何在生產服務器上托管所有內容。

您的 Angular 方法沒問題。 如果重寫工作,很高興。

For NodeJS project, if you launch npm run start (or whatever script you use), Windows' CMD (or PowerShell), at least on Windows Server, when you logout from your session usually blocks/freezes the console, so you literally got nothing .

現在,要解決它, PM2工具是您的朋友( https://pm2.keymetrics.io/ )。 按照他們的文檔,配置和運行非常容易。

我不是mongo的用戶。 我會說你需要一項服務來讓它始終運行。

編輯)我在這里發現了這個問題: How do I start Mongo DB from Windows?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM