Astro Islands & SSR (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
How does File-Based Routing work in Astro (`src/pages/`)?
senior LevelRoutingAstro
In Simple Words:
Astro uses the filesystem structure inside src/pages/ to generate routes:
src/pages/index.astro->/src/pages/about.astro->/aboutsrc/pages/blog/[slug].astro-> Dynamic route/blog/:slugsrc/pages/api/checkout.ts-> Server endpoint API route returning JSON.