Live reload automatically restarts your server when you save changes to files. No more manual restarts!
Your controller is already configured for live reload!
Just run:
npm run devThat's it! The server will now automatically reload when you make changes.
- Edit any file in the web interface
- Save (Ctrl+S or click Save)
- Server auto-reloads (watch terminal for confirmation)
- Refresh browser to see changes
- Open
C:\Users\nedpe\LocalNexusController - Edit files (Python, HTML, CSS, JS)
- Save (Ctrl+S)
- Server auto-reloads automatically
- Refresh browser to see changes
| File Type | Location | Example |
|---|---|---|
| Python | local_nexus_controller/*.py |
models.py, main.py |
| Templates | local_nexus_controller/templates/*.html |
dashboard.html |
| Styles | local_nexus_controller/static/*.css |
styles.css |
| Scripts | local_nexus_controller/static/*.js |
app.js |
Scenario: Change the dashboard title color
- Open
local_nexus_controller/templates/dashboard.html - Find the title:
<h1 class="text-2xl">Dashboard</h1> - Change to:
<h1 class="text-2xl text-blue-400">Dashboard</h1> - Save the file
- Watch terminal: You'll see "Reloading..."
- Refresh browser: Title is now blue!
Faster Testing:
- Keep browser DevTools open (F12)
- Use keyboard shortcut: Ctrl+Shift+R for hard refresh
- Edit in one window, view in another
Reduce Reload Time:
- Make small, focused changes
- Test one feature at a time
- Keep the terminal visible to monitor reload status
Avoid Common Issues:
- Wait for reload to complete before refreshing browser
- Fix syntax errors immediately (server won't start with errors)
- Hard refresh if CSS changes don't appear
Live reload is controlled by .env:
# Enable live reload (already set!)
LOCAL_NEXUS_RELOAD=trueTo disable (for production):
LOCAL_NEXUS_RELOAD=falseTerminal output during reload:
INFO: Uvicorn running on http://0.0.0.0:5010 (Press CTRL+C to quit)
INFO: Started reloader process [12345] using WatchFiles
INFO: Started server process [12346]
INFO: Waiting for application startup.
INFO: Application startup complete.
# After you save a file:
INFO: WatchFiles detected changes in 'templates/dashboard.html'
INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [12346]
INFO: Started server process [12347]
INFO: Waiting for application startup.
INFO: Application startup complete.
1. Check reload is enabled:
# Look in .env file
LOCAL_NEXUS_RELOAD=true2. Hard refresh browser:
- Windows:
Ctrl + Shift + R - Mac:
Cmd + Shift + R
3. Clear browser cache:
- Open DevTools (F12)
- Right-click refresh button
- Select "Empty Cache and Hard Reload"
1. Verify you're using npm run dev:
npm run dev # ✓ Correct (uses settings)
python -m local_nexus_controller # ✓ Also works (uses settings)2. Check terminal for errors:
- Syntax errors prevent reload
- Fix the error and save again
3. Restart manually if stuck:
- Stop server:
Ctrl + C - Start again:
npm run dev
The watcher monitors:
local_nexus_controller/**/*.pylocal_nexus_controller/**/*.htmllocal_nexus_controller/**/*.csslocal_nexus_controller/**/*.js
If editing files outside these patterns, they won't trigger reload.
DO:
- ✅ Save files before expecting changes
- ✅ Wait for reload to complete (1-2 seconds)
- ✅ Keep terminal visible to see reload status
- ✅ Test changes incrementally
- ✅ Use hard refresh for CSS changes
DON'T:
- ❌ Make changes without saving
- ❌ Refresh during reload
- ❌ Edit multiple files at once when testing
- ❌ Ignore error messages in terminal
- ❌ Run multiple instances of the server
| Setting | Development | Production |
|---|---|---|
LOCAL_NEXUS_RELOAD |
true |
false |
LOCAL_NEXUS_OPEN_BROWSER |
true |
false |
LOCAL_NEXUS_HOST |
0.0.0.0 |
127.0.0.1 |
| Start Command | npm run dev |
npm start |
- Configuration:
.env- Live reload settings - Server Entry:
local_nexus_controller/__main__.py- Uvicorn setup - Dev Guide:
DEVELOPMENT.md- Detailed development info - Recommendations:
RECOMMENDATIONS.md- Best practices
Live reload is enabled and ready to use. Start making changes and watch them appear instantly!
# Start developing
npm run dev
# Make changes in Bolt.new or Cursor
# Save and see changes instantly!Happy coding! 🚀