Routing
Next.js routes live in the pages/ directory. You fetch data with getServerSideProps or getStaticProps.
In the Pages Router each file under pages/ is a route rendered by its default export. Data fetching uses getServerSideProps for per request work or getStaticProps at build time. The App Router replaced this as the default so new projects do not use these functions.