MCPcopy Create free account
hub / github.com/vercel/examples / read_root

Function read_root

python/starlette/main.py:7–97  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

5
6
7async def read_root(request):
8 return HTMLResponse("""
9 <!DOCTYPE html>
10 <html lang="en">
11 <head>
12 <meta charset="UTF-8">
13 <meta name="viewport" content="width=device-width, initial-scale=1.0">
14 <title>Vercel + Starlette</title>
15 <link rel="icon" type="image/svg+xml" href="/favicon.ico">
16 <style>
17 * { margin: 0; padding: 0; box-sizing: border-box; }
18 body {
19 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
20 background-color: #000000; color: #ffffff; line-height: 1.6; min-height: 100vh;
21 display: flex; flex-direction: column;
22 }
23 header { border-bottom: 1px solid #333333; padding: 0; }
24 nav { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; padding: 1rem 2rem; gap: 2rem; }
25 .logo { font-size: 1.25rem; font-weight: 600; color: #ffffff; text-decoration: none; }
26 .nav-links { display: flex; gap: 1.5rem; margin-left: auto; }
27 .nav-links a { text-decoration: none; color: #888888; padding: 0.5rem 1rem; border-radius: 6px; transition: all 0.2s ease; font-size: 0.875rem; font-weight: 500; }
28 .nav-links a:hover { color: #ffffff; background-color: #111111; }
29 main { flex: 1; max-width: 1200px; margin: 0 auto; padding: 4rem 2rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
30 .hero { margin-bottom: 3rem; }
31 .hero-code { margin-top: 2rem; width: 100%; max-width: 900px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
32 .hero-code pre { background-color: #0a0a0a; border: 1px solid #333333; border-radius: 8px; padding: 1.5rem; text-align: left; grid-column: 1 / -1; }
33 h1 { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; background: linear-gradient(to right, #ffffff, #888888); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
34 .subtitle { font-size: 1.25rem; color: #888888; margin-bottom: 2rem; max-width: 600px; }
35 .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; width: 100%; max-width: 900px; }
36 .card { background-color: #111111; border: 1px solid #333333; border-radius: 8px; padding: 1.5rem; transition: all 0.2s ease; text-align: left; }
37 .card:hover { border-color: #555555; transform: translateY(-2px); }
38 .card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; color: #ffffff; }
39 .card p { color: #888888; font-size: 0.875rem; margin-bottom: 1rem; }
40 .card a { display: inline-flex; align-items: center; color: #ffffff; text-decoration: none; font-size: 0.875rem; font-weight: 500; padding: 0.5rem 1rem; background-color: #222222; border-radius: 6px; border: 1px solid #333333; transition: all 0.2s ease; }
41 .card a:hover { background-color: #333333; border-color: #555555; }
42 .status-badge { display: inline-flex; align-items: center; gap: 0.5rem; background-color: #0070f3; color: #ffffff; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 500; margin-bottom: 2rem; }
43 .status-dot { width: 6px; height: 6px; background-color: #00ff88; border-radius: 50%; }
44 pre { background-color: #0a0a0a; border: 1px solid #333333; border-radius: 6px; padding: 1rem; overflow-x: auto; margin: 0; }
45 code { font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace; font-size: 0.85rem; line-height: 1.5; color: #ffffff; }
46 .keyword { color: #ff79c6; }
47 .string { color: #f1fa8c; }
48 .function { color: #50fa7b; }
49 .class { color: #8be9fd; }
50 .module { color: #8be9fd; }
51 .variable { color: #f8f8f2; }
52 .decorator { color: #ffb86c; }
53 @media (max-width: 768px) {
54 nav { padding: 1rem; flex-direction: column; gap: 1rem; }
55 .nav-links { margin-left: 0; }
56 main { padding: 2rem 1rem; }
57 h1 { font-size: 2rem; }
58 .hero-code { grid-template-columns: 1fr; }
59 .cards { grid-template-columns: 1fr; }
60 }
61 </style>
62 </head>
63 <body>
64 <header>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected