Overview - Server endpoints (API routes)
What is it?
Server endpoints, also called API routes, are special URLs in a web project that respond to requests from users or other programs. They let your website or app talk to a server to get or send data, like fetching user info or saving a form. In Astro, you create these endpoints as files that handle requests and send back responses. This makes your site interactive and dynamic, not just static pages.
Why it matters
Without server endpoints, websites would only show fixed content and couldn't react to user actions or share data with other services. Endpoints let you build features like login, data updates, or connecting to databases. They make your site useful and connected, turning simple pages into powerful apps.
Where it fits
Before learning server endpoints, you should understand basic web development, including how HTTP requests and responses work. After mastering endpoints, you can explore advanced topics like authentication, database integration, and serverless functions to build full-featured web applications.
