Lesson 14
Goal
Hosting your project requires you to make the HTML, JavaScript and CSS files available over the Internet.
There are three hosting options, depending on how much of a challenge you are looking for:
- Use a static site hosting service
- Use git and Github Pages
- Roll your own with a hosting provider
Using a Static Site Hosting Service
If you are brand new to hosting websites, you may want to use a static site hosting service. These allow you to upload a zip file of html, css and javascript and have a working website. An easy one is Forge.
- Sign up for Forge
- Zip your project directory
- Drag it into the Forge website
Now you have a fully functioning site hosted online! Share the link with your friends and family and wow them with your skills!
Using Git and Github Pages
If you like with git and github, take a stab at setting up your site with Github Pages. The easiest thing to do is: cd .
- From the terminal,
cd
into your project directory - Turn it into a git repository by running
git init
- Checkout a branch called
gh-pages
- Commit all the files
- Create a remote repository on github for the project.
- Follow their instructions for adding the github remote to your existing repo
- Follow the instructions on Github Pages for setting up a project site from scratch.
- Make the
gh-pages
the default branch - Push it on up!
Rolling Your Own Hosting With a Cloud Provider
If you secretly are an unix admin who floats in the cloud; consider using Amazon S3 or Rackspace Cloud Files
Both of these services are designed to serve up static files without needing to pay for a virtual server. This makes your monthly hosting bill for even large, high traffic sites incredibly cheap.
Credits
This curriculum was originally written by Zassmin Montes de Oca and Zee Spencer, and has been improved by all sorts of lovely RailsBridge volunteers.