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 trialJames Marshall
Courses Plus Student 4,468 PointsMultiple website projects
Hello Everyone!
I'm relatively new to the front end world, and I was wondering if I could have a few pointers. What exactly would be the best way to go about developing multiple websites at once. My current problem is that I am using MAMP as a local server on my computer. I don't really know how to have multiple sites on one local server, so I find myself constantly replacing the files in the htdocs with different website folders. There has to be a better way to do this.
Cheers
James.
5 Answers
Michael Collins
3,447 PointsHi James,
If you are using MAMP, in the htdocs folder you can just have several folders, one for each website.
E.g.
- htdocs/website1
- htdocs/website2
- htdocs/website3
Then you can access those websites via:
There is no need to replace the files each time.
[MOD: Edited - added lists - srh]
Steve Hunter
57,712 PointsHi James,
Have you had a look at Heroku? This allows you to deploy up to 5 web applications into a fully hosted environment. You can deploy to Heroku in the same way as you push your to a version control repository like Github. So getting your site live is super easy.
Each application will have its own URL which you can change from the default, slightly bizarre, name it'll get given.
It's well worth a try and certainly worth the initial hassle/confusion to get it working for you. You can play with your code locally, make sure you're happy with it, then push it up to Heroku to see it in a live environment. Perfect for showing clients your progress on their project.
Shout if you need a hand with it - and good luck!
Steve.
Dave Yankowiak
9,105 PointsIf you happen to be on a Mac and working with WordPress, Local by Flywheel is pretty awesome and easy: https://local.getflywheel.com/ I don't do a lot of local development, but when I need to, this is what I use.
Samuel Ferree
31,722 PointsWhat about developing your sites and serving them up with github pages?
each site would have it's own github repo, and thus access to it's own github pages site.
Steve Hunter
57,712 PointsGood call; link for info here.
James Marshall
Courses Plus Student 4,468 PointsThank you all so much for your help!