Reputation: 325
I was just looking for an explanation on how to host my Nuxt.js app and Node.js Server with MongoDB. Should I run the Node.js and MongoDB seperatly? And how do I rewrite for example GET requests to my Node.js server. Do I use the static IP of the node.js server?
tia
Upvotes: 1
Views: 871
Reputation: 7541
was just looking for an explanation on how to host my Nuxt.js app and Node.js Server with MongoDB. Should I run the Node.js and MongoDB separately?
In order to run this, you will need mongo running, and node running, yes you do need two things running. You can have them both running on the same server. For instance, if you have an AWS EC2 instance, then you can run them both on that server (or if you are running it on your own computer, you can run it from one computer.)
That is not the recommendation for production, that is, if you want lots of users to use it, you should not do this. Instead, you should host node in one place, and have mongo running in another. That way you can have better security and easier scaling.
And how do I rewrite for example GET requests to my Node.js server. Do I use the static IP of the node.js server?
Not sure what you mean, but if you mean, can I hit an endpoint from a browser or cURL script using the static IP of the node.js server - the answer is yes you can.
Upvotes: 1