Skip to content

 Threejs and TypeScript
 SocketIO and TypeScript
 Blender Topological Earth
 Sweet Home 3D
 Design Patterns Python
 Design Patterns TypeScript
 Course Coupon Codes
Python   TypeScript
Kindle Edition Kindle Edition
$9.99 $14.99 $9.99 $14.99
Paperback Paperback
$19.99 $24.99 $19.99 $24.99

Host using GitHub Pages

Video Lecture

Host using GitHub Pages Host using GitHub Pages Host using GitHub Pages


Provided that out Three.js project works fully client side in a web browser just by downloading static files, e.g, the index.html, bundle.js and possibly some extra assets such as images, 3D models, static json, css, other html and javascript files, then we can host the contents of our ./dist/client/ folder using GitHub pages for free.

  1. Log into your GitHub account and create a new repository using any name that you want. E.g., My-Project. Note that the name needs to conform to the following rules.

    • Max length 39 characters
    • Alphanumeric or hyphen (-)
    • Cannot start with a hyphen
    • No consecutive hyphens
    • Cannot be a reserved name
    • Unique for your account
  2. Upload the required files from your ./dist/client/ folder. E.g., index.html, bundle,js and any other assets such as any images or 3D models needed by your project.

  3. If your assets, such as any 3D models or images should also be placed in a sub folder, then you can edit the file name using the GitHub user interface, prepend the required folder name and follow it with a / in front of the existing file name and then press the Commit button. See video for example.

  4. Go to Settings/Pages and change Source to Branch: main and then select \root and then press the Save button.

You will be presented with a public URL that will point to your public GitHub page. Note that visiting this new URL to soon may result in a 404 error. It can take a minute or 2 before it will be live.

Visit :

This is a very simple and minimal approach to hosting your Three.js examples for free as long as they can be fully downloaded as static files and don't require any bespoke or dynamic server side functionality or interaction.

GitHib Pages is acting just like a static HTTP web server but using a GitHub web address and an SSL certificate.