fix: nginx proxy /api/ vers backend + routes shopping et notes manquantes
- Ajoute location /api/ dans nginx.conf pour proxifier les requêtes API - Crée ShoppingPage et NotesPage (placeholders phase suivante) - Enregistre les routes /shopping et /notes dans App.tsx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,12 @@ server {
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8000/api/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ import { BrowserRouter, Routes, Route } from 'react-router-dom'
|
||||
import Layout from './components/layout/Layout'
|
||||
import HomePage from './pages/HomePage'
|
||||
import TodosPage from './pages/TodosPage'
|
||||
import ShoppingPage from './pages/ShoppingPage'
|
||||
import NotesPage from './pages/NotesPage'
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
@@ -10,6 +12,8 @@ export default function App() {
|
||||
<Route path="/" element={<Layout />}>
|
||||
<Route index element={<HomePage />} />
|
||||
<Route path="todos" element={<TodosPage />} />
|
||||
<Route path="shopping" element={<ShoppingPage />} />
|
||||
<Route path="notes" element={<NotesPage />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
export default function NotesPage() {
|
||||
return (
|
||||
<div style={{ padding: 24, color: 'var(--ink-1)', fontFamily: 'var(--font-ui)' }}>
|
||||
<h1 style={{ fontSize: 24, fontWeight: 700, marginBottom: 8 }}>Notes</h1>
|
||||
<p style={{ color: 'var(--ink-3)' }}>Module en cours de développement — Phase 2b</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export default function ShoppingPage() {
|
||||
return (
|
||||
<div style={{ padding: 24, color: 'var(--ink-1)', fontFamily: 'var(--font-ui)' }}>
|
||||
<h1 style={{ fontSize: 24, fontWeight: 700, marginBottom: 8 }}>Courses</h1>
|
||||
<p style={{ color: 'var(--ink-3)' }}>Module en cours de développement — Phase 3</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user