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 in Node-js by Vaani
• 6,820 points
30 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.
answered May 27 by Neha
• 8,560 points

Related Questions In Node-js

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,720 points
4,238 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,720 points
1,052 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,720 points
181 views
0 votes
1 answer

How to split and modify a string in NodeJS?

Hello @kartik, Use split and map function: var str = "123, 124, 234,252"; var ...READ MORE

answered Oct 16, 2020 in Node-js by Niroj
• 82,720 points
361 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
962 views
0 votes
1 answer
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,080 points
1,993 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 in Node-js by Neha
• 8,560 points
10 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP