JS The Right Way - Deployment & Usage Guide
1. Prerequisites
- Git (for cloning the repository)
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Optional: Node.js (v14+) and npm — only if you prefer a local development server over direct file access
2. Installation
Clone the repository to your local machine:
git clone https://github.com/jstherightway/js-the-right-way.git
cd js-the-right-way
No dependency installation is required — this is a static HTML site.
3. Configuration
This project requires no environment variables, API keys, or build configuration.
For custom domain deployment only:
If deploying to your own domain (instead of the default GitHub Pages/Netlify subdomain), create or edit the CNAME file in the project root:
echo "yourdomain.com" > CNAME
4. Build & Run
No build step is required. Choose one of the following methods to view the site locally:
Option A: Direct File Access (Simplest)
Open index.html directly in your browser:
# macOS
open index.html
# Linux
xdg-open index.html
# Windows
start index.html
Option B: Local Development Server (Recommended)
Use a local server to avoid CORS issues with external resources and ensure proper asset loading:
Using Python (if installed):
# Python 3
python -m http.server 8000
# Python 2
python -m SimpleHTTPServer 8000
Using Node.js:
npx serve -p 8000
Using PHP:
php -S localhost:8000
Then navigate to http://localhost:8000 in your browser.
5. Deployment
GitHub Pages (Recommended)
- Push the repository to GitHub
- Go to Settings > Pages in your repository
- Select source: Deploy from a branch
- Choose branch:
main(ormaster) and folder:/ (root) - Save. Your site will be available at
https://yourusername.github.io/js-the-right-way
For custom domain: Add your domain to the CNAME file and configure DNS records (CNAME or A records) pointing to GitHub Pages.
Netlify
- Drag and drop the project folder to Netlify Drop
- Or connect your GitHub repository for continuous deployment
- Build settings: Leave blank (no build command, publish directory:
.)
Vercel
npx vercel --prod
When prompted:
- Set up and deploy:
Y - Link to existing project:
N(or link if updating) - Build command: (leave empty, press Enter)
- Output directory:
.(current directory)
Any Static Host
Upload all files (HTML, CSS, JS, images) to your web server via FTP/SFTP, or sync with AWS S3, Cloudflare Pages, or Surge.sh.
6. Troubleshooting
| Issue | Solution |
|---|---|
| Assets (CSS/JS) not loading | You're likely using file:// protocol. Use a local server (Option B in section 4) instead of opening the file directly. |
| Custom domain shows 404 | Ensure the CNAME file exists in the repository root with your domain name. Check DNS records are properly configured (CNAME pointing to username.github.io for GitHub Pages). |
| Changes not appearing after deployment | Clear browser cache or perform a hard refresh: Ctrl+F5 (Windows/Linux) or Cmd+Shift+R (macOS). |
| Images not displaying | Verify image paths are relative (e.g., ./images/logo.png not /images/logo.png) if deploying to a subdirectory. |
| License compliance warning | This project uses CC BY-NC-SA 3.0. Ensure your deployment does not imply commercial use without permission. |