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

0 votes
I'm using angular for the frontend and node for the backend, and I need both to run on a Windows server. I can host Angular using URL rewrite on IIS, but I'm not sure what to do with nodejs code. Is it okay to run nodejs code first, then Angular on IIS? Also, how do I keep mongod.exe running when I'm hosting? I'm curious as to how I can host everything on a production server.
May 27, 2022 in Node-js by Vaani
• 7,020 points
980 views

1 answer to this question.

0 votes

It's fine that you're using Angular. Be happy if the rewrite succeeds.

If you run npm run start (or whatever script you use) in a NodeJS project, Windows' CMD (or PowerShell), at least on Windows Server, usually blocks/freezes the console after you logout, so you get nothing.

Now, to fix it, the PM2 tool (https://pm2.keymetrics.io/) is your best buddy. It's very simple to set up and run if you follow their instructions.

I'm not a MongoDB user. I believe you'll need a service to keep it running at all times.

To know more about Angular, It's recommended to join Angular Course today.

answered May 27, 2022 by Neha
• 9,060 points

Related Questions In Node-js

0 votes
0 answers

How to install NodeJS LTS on Windows as a local user (without admin rights)

I'm using Windows as a simple user ...READ MORE

Aug 11, 2022 in Node-js by Neha
• 9,060 points
1,311 views
0 votes
1 answer

How to host a Node.Js application in shared hosting?

Hello @kartik, You can run node.js server on a typical ...READ MORE

answered Jul 17, 2020 in Node-js by Niroj
• 82,880 points
6,635 views
0 votes
1 answer

How to create an Excel File with Nodejs?

Hello @kartik, Just create a file with Tabs ...READ MORE

answered Sep 7, 2020 in Node-js by Niroj
• 82,880 points
2,083 views
0 votes
1 answer

How to automate npm and bower install with grunt?

Hello @kartik, To install client side components during npm ...READ MORE

answered Oct 13, 2020 in Node-js by Niroj
• 82,880 points
508 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,632 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,202 views
0 votes
1 answer

Unable to start express server on AWS instance

It's not your code — you can't connect ...READ MORE

answered Oct 1, 2018 in AWS by Priyaj
• 58,090 points
2,751 views
0 votes
1 answer
0 votes
1 answer

How to make login with Nodejs and MongoDB?

MongoDB Login and Registration with Node js ...READ MORE

answered Jun 16, 2022 in Node-js by Neha
• 9,060 points
9,470 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP