DEV Community

Discussion on: Organize Your Side Projects with a Single Domain!

Collapse
 
anduser96 profile image
Andrei Gatej

Great article! I do have a few questions.

  1. Let’s say that I have a full stack node app, that uses, for example, mongodb as the db. And now that I have this app, I want to sell it to various companies. They will all use the same app, but with different ‘instances’. I’m no expert in this, and I’d like to know how could I achieve that. If needed, I could elaborate a little bit more.
  2. What hosting service would you recommend for node apps?

Thank you for your time!

Collapse
 
joshhadik profile image
Josh Hadik
  1. It sounds like what you're describing might be outside of the scope of this article. Side project domains are a great way to showcase your live projects to potential employers or clients, or to setup small projects that you don't have enough traffic yet to justify buying it's own domain. The keyword in that last sentence is 'live projects', the end goal is to give users a way to access the site or app on the web (think Twitter or Youtube). In your case, it sounds like the end goal is to sell developers the code that they can use to build 'instances' of your app, which doesn't make as much sense to use a side project domain for. Let me know if I misunderstood what you were saying!

  2. I haven't worked a lot with node, but I always recommend using cloud service providers as opposed to traditional hosting services, so I'd look into Heroku, AWS, Google Cloud, or Digital Ocean. Heroku's probably best if you want to keep things simple!

Collapse
 
anduser96 profile image
Andrei Gatej

Sorry! I was in a rush, so I couldn't write what I meant properly.
The end goal is to sell my app to small companies. Well not really to sell it, but make them use my app.
I'll take another example. Let's say that I have built an invoice app which will help all the groceries stores in my town. This is what I meant by different instances. This implies that grocery store X will have different products than grocery store Y, but they would still use the same app that I built.
So the final question is: If I want to have my app used by multiple users, I should make sure that for every app I use a different domain so the data won't get mixed up?

I'm sorry if I'm going too much beyond the scope of the article, I've been having this unclarity for a while.
Thank you once again!

Thread Thread
 
mukulrajpoot262610 profile image
Mukul Rajpoot

Hello, have you figured out this, because I am also building something similar to this.
Please let me know how to do that

Thanks

Collapse
 
kspeakman profile image
Kasey Speakman

Search around for multitenant architecture or just multitenancy. Domain-wise, there are multiple ways to do it. AWS has an SDK where you can dynamically add new DNS records to Route 53. Or you can create a wildcard DNS record so a web server can answer to <anything>.mydomain.com -- any subdomain works without having to create a new DNS record.

For data security, you have to associate a tenant ID to each user account anyway, to make sure they can only access their own data. The subdomain things is really for display/customized-link purposes when using multi-tenancy.

You can also deploy multiple copies of your app instead of using multi-tenant-aware system, but that can become difficult to manage as you add more customers.

Collapse
 
anduser96 profile image
Andrei Gatej

I’ll definitely do some research. My intention at first was to assign a copy to each user.
Now I have more options. I shall see.
Thank you!