4 ms·
Because the `/pages/api` folder _lets_ you create a backend, very similar to any other web app server (ie, Express). You are not _required_ to use that feature
by acemarke 5y ago
Because the `/pages/api` folder _lets_ you create a backend, very similar to any other web app server (ie, Express).
You are not _required_ to use that feature, but if you choose to use it, _that_ is where you'd do all your standard DB connections and returning JSON responses.