Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Want to learn how to server structure a 'build your website' application with Node.js

Like the title says, I am trying to understand how a build your own website / host it and append your domain works using Node.js/Express.js to structure the server and possibly MongoDB for the database.

I guess I came to Treehouse because I have really come a long way from starting and while I know this is a really advanced topic, I really don't know where to look or even look up. So I want to break this down as simply as possible.

To start this off, I understand I will need to make a REST API to handle the majority of the web application, and that isn't what I am asking about. I want to learn really how the following works:

1) I have built a simple CMS for testing purposes most of which is REST based. With services like WIX / Squarespace, are they having users save templates / files to a shared storage and are associating these templates / websites with only the user and then accessing them once the associated domain is called? Sorry, I feel like I am complicating this but how would one let users customize a template and save it uniquely to them? Where are the files stored? Do you generate a unique folder structure for that user and some how save the associated files to the user? Yeah, I am lost at this point... Sorry :/

2) Once the user has their template / little shop set up, how would you let the user set a domain to their template they worked on? Here, I guess I would love a reference on how domains work and how you could let your users point their custom domain to your application and further more, their specific template of that application.

This is a lot and I am not expecting a straight answer really (although it would be awesome if you did), but would love some references to where I could start learning this stuff or even what the proper way to ask about this would be. Thanks everyone! Hope someone can help!

1 Answer

Dave StSomeWhere
Dave StSomeWhere
19,870 Points

:tropical_drink: Here's a partial semi-straight kinda sort-of answer.

The best thing is that it sounds like you have a pretty good idea of what you want, so, it would probably make sense to start with cleaning it up and formalize it into a requirements document (so, if you don't know what that is, start with how to create a requirements document).

Since you are talking about users, the next step would be to investigate user authentication and authorization.

I would break things down into application and infrastructure.

Are you planning on doing this all yourself or planning to buy things like managed VPS services for your hosting?

Do you have any DNS knowledge. Since you mentioned domains - have you purchased a domain name, worked on a vps or shared host?

Just some initial thoughts from the peanut gallery :palm_tree: