DEV Community

Cover image for Organize Your Side Projects with a Single Domain!

Organize Your Side Projects with a Single Domain!

Josh Hadik on February 05, 2019

If you’ve built a few side projects over the years, chances are you’ve ended up using a few domains like this: something-super-cool.herokuapp.com. ...
Collapse
 
michaeltharrington profile image
Michael Tharrington • Edited

Hey Josh, great post!

Just a quick tip. I noticed that you link to the Seven Steps... at the end of your post.

You could also edit both this post and the other to include "series: whatever name you'd like for your series" in the front matter. This'll connect your two posts with a cool little dot scroll option at the top of each post that lets the reader easily flip between posts in the series.

Umm yeah, no idea what this option is actually called, so chose to call it a "dot scroll" ... but anyway, it looks like this:

my series

... in my posts here & here.

Of course, it's not necessary, just a nice to have!

Collapse
 
joshhadik profile image
Josh Hadik

I love this! Thanks for sharing!

Is there anyway to control the order? I'm assuming it's just based on the date, and apparently I posted the wrong one first

Collapse
 
michaeltharrington profile image
Michael Tharrington

So yep, your hypotheses is correct — works based on the published date!

Thread Thread
 
joshhadik profile image
Josh Hadik • Edited

Ahh yeah I figured... now I know for the future!

Collapse
 
michaeltharrington profile image
Michael Tharrington

Hmmmm... honestly, I've not tried to fiddle with that yet. I'll see what I can find out and let ya know. :-)

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
 
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!

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
 
priteshusadadiya profile image
Pritesh Usadadiya

And that sense of relief is followed almost immediately by a decision that you will never, for as long as you breathe, touch the settings for that domain again.

-- So True. Last time i edited or even viewed the CNAME records when i first bought the domain. It's a inner fear that something will break.

Collapse
 
joshhadik profile image
Josh Hadik

Exactly! And the fear came for a good reason because whenever I used to mess with it, something usually did break.

Collapse
 
emptyflash_86 profile image
Cameron Alexander

Awesome article Josh! I actually had this problem for a long time, I didn't really like subdomains for my personal projects because they take so long to update, and then if I want HTTPS the service I'm using (Heroku, GitHub Pages, Netlify, etc.) has to provide it.

That's actually why I made Routepath (routepath.app). It's a hosted reverse proxy service that lets you route paths on your domain to different locations. I've been using it with my side projects for a couple of months now, and it solves all of my problems.

Collapse
 
mikkel250 profile image
mikkel250 • Edited

Agreed! I just had a similar experience as you described when I recently decided to move hosting providers. I'm really glad I took the plunge. If you are comfortable plopping down a decent amount of coin up front, it actually works out to about the same as a Netflix subscription for the first 3 years or so.
I also took the time to really research providers and have been very happy with Siteground (esp after godaddy), if anyone's looking for hosting, I highly recommend them: siteground.com/?referrer_id=7910825

Collapse
 
phavor profile image
Favour George

Step 1 - 10 has deterred me from setting even a single domain. That experience can hurt. lolzzz

Collapse
 
joshhadik profile image
Josh Hadik • Edited

It scarred me for almost three years!

Collapse
 
phavor profile image
Favour George

Am gonna follow through with the Route53 tuts

Thread Thread
 
joshhadik profile image
Josh Hadik • Edited

Awesome! Let me know if you get stuck on anything!

Collapse
 
jajoosam profile image
Samarth Jajoo

Been doing this for a while - I have like a dozen projects up on 4ty2.fun - also love that domain name :)

Collapse
 
joshhadik profile image
Josh Hadik

Just checked it out... you've got a lot of cool stuff on there!