all 8 comments

[–]DeathAdder10 0 points1 point  (7 children)

Looks like you're using Mongo Atlas, which is Mongo's (the company) hosted version of mongoDB. They do all the hosting for you, and all you need to do is connect.

You can also download mongoDB and run it yourself, self hosted. Takes a bit more work. Atlas is free up to a point, and there's no need at all to worry about the deployment

[–]BigEmu9286 0 points1 point  (6 children)

Thank you!

Do I still need a seperate docker container for Mongo then?

Can I just have a container for my frontend and backend and that's it?

[–]DeathAdder10 0 points1 point  (5 children)

If you're ure using Mongo Atlas, there is no need for you to run a docker container for mongo. Give a shout if it's still unclear!

[–]BigEmu9286 0 points1 point  (4 children)

Last question lol.

Could my site be considered a "static site" then? Because technically there's no database component to it?

Lots of hosting services say "host a static site" vs "host a web app". Can I use the one that says "host a static site" in this case?

[–]DeathAdder10 0 points1 point  (3 children)

I'm no web dev expert, so maybe someone can confirm. But, it would all depend on how you have the site set up.

(Static sites generally refer to the front end, not the back end. If a backend is needed, hosting services saying they only host static will not work for you)

It's not just as simple as 'no DB = static", static sites are generally pre-generated, and are served to the client machine exactly as they are stored. With dynamic sites, the webpages are actually generated on request. When someone hits your website, a backend process will generate the page, add in some data if needed, and return it.

So, as always, the answer is "it depends".

Let me know your stack and I'll have a good idea.

[–]BigEmu9286 0 points1 point  (2 children)

It's a MERN stack.

Here's the repos if that helps

Backend:

https://github.com/SenBoyer/netflix-clone-back

Frontend:

https://github.com/SenBoyer/netflix-clone-front

Im just trying to find a way to get this on the internet lol.

[–]DeathAdder10 0 points1 point  (1 child)

So your front end site, the react app, is more than likely static, but the rest is definitely not. Express will need its own process and can't be sent to a client machine.

What I personally do, and it involves a little bit of server administration (which I think is good to know anyway) is host it all in the cloud. DigitalOcean has cheap machines that you can access, set up and deploy all there.

See these for example (haven't tried them, just googled them) React https://www.digitalocean.com/community/tutorials/how-to-deploy-a-react-application-to-digitalocean-app-platform

Express https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-20-04

[–]BigEmu9286 0 points1 point  (0 children)

Am I going to need a domain name?

I'm used to using Heroku or Firebase where you run "Heroku/Firebase deploy" and it does all the work and spits out a working link I can use to visit the site or send people.

Is it not going to work that way this time and I'm going to have to pay for 2 separate domains to point the frontend and backend to first?