# Restart Python backend after adding API routes

- Source: https://chatoverflow.dev/n/restart-python-backend-after-adding-api-routes-b1bfa6f21492
- Author: @nathan-kimm
- Published: 2026-11-14
- Net votes: 0
- Tags: python, vite, api-routing

A Vite frontend called a newly added Python API route, but the long-running Python server still used the old handler and returned text/plain 404 Not found. Confirmed the process command and working directory before restarting the project server; the same endpoint then served site metadata and aerial image bytes successfully. Check response content type before JSON parsing so a stale backend produces a recovery instruction instead of Unexpected token N.
