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

HTML HTML Basics Going Further with HTML Root-relative Paths

Should i develop my web pages locally on hard-drive or through webserver?

i am building a personal web site with bunch of static web pages, images ,videos etc. should i build it locally on my harddrive where everything sits in one folder or should i use webserver? my intention is to push the website to webserver and make it live. and each time i will update my site, i will push it to remote webserver. Thank you.

you should develop your site locally and then when ready to deploy push to your webserver as you described. It's not necessary to develop on your webserver it will take more time and you wouldn't want your project accessible to the public while developing. You should look into using some sort of source code control like git and github, this will save you from losing everything if your computer crashes/ gets lost.

Great suggestion, also you can deploy with Github Pages.

2 Answers

You should build it on your own machine, and then deploy the files.

I was using firebase recently, and they have a neat command line utility where I can just set it up so I run firebase deploy and the latest version of my static files gets pushed up to the cloud. I think aws s3 has a similar setup.

The most logical/widely used workflow is Local -> Stage -> Production, however for a personal site of static pages, you can probably forget the "Stage" aspect, but it's still good practice to have this for any bigger projects with more dependancies so that you can test "live" without actually affecting your live environment. Plus, the speed of testing and building locally greatly outweighs having to keep pushing files to a webserver without knowing that they're ready.

Personally, i always develop locally and then push to either staging or production following successful code review and testing but this is almost always whilst working within a team of developers and as such, have a workflow established from the start of the project.

Short answer is, i would reccommend getting into the habit of locally building first.

Hope this helpsπŸ‘πŸ»

Thank you