Skip to main content

start-docusaurus.py

start-docusaurus.py starts the Docusaurus development server with automatic cleanup and process management.

What It Does

The script performs these operations before starting the server:

  1. Kills Existing Processes - Automatically terminates any process running on port 3000
  2. Clears Caches - Removes .docusaurus, build, and node_modules/.cache directories
  3. Starts Fresh Server - Launches the Docusaurus development server
  4. Cross-Platform - Works on macOS, Linux, and Windows

Usage

Start the Server

cd /Users/james.bognar/git/juneau
python3 scripts/start-docusaurus.py

The server will start at http://localhost:3000/

Press Ctrl+C to stop the server.

When to Use

Use this script when:

  • Starting development on documentation
  • The server is acting strangely (cache issues)
  • Need a clean server start
  • Testing documentation changes locally

Requirements

  • Python 3.6 or higher
  • Node.js 18+ and npm
  • Dependencies installed (npm install in juneau-docs directory)
  • No external Python dependencies (uses only standard library)

Notes

  • The script automatically detects the /juneau-docs directory
  • Cache clearing is automatic - no flags needed
  • The server supports hot-reloading (changes appear immediately in browser)
  • Port 3000 must be available (script will kill existing processes)
Discussion

Share feedback or follow-up questions for this page directly through GitHub.