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:
- Kills Existing Processes - Automatically terminates any process running on port 3000
- Clears Caches - Removes
.docusaurus,build, andnode_modules/.cachedirectories - Starts Fresh Server - Launches the Docusaurus development server
- 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 installinjuneau-docsdirectory) - No external Python dependencies (uses only standard library)
Notes
- The script automatically detects the
/juneau-docsdirectory - 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)
Share feedback or follow-up questions for this page directly through GitHub.