mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What? Added a new option for `create-next-app` to create a headless API app. This includes: - Adding a `--api` flag for `create-next-app` to create a headless app. - Modifying the template to include only the required assets (no `public/`, `app/page.*`, etc.). - Ensuring the app includes only the required dependencies (no `@types/react`, `react`, etc.). ### Why? This feature allows users to initialize projects with headless API templates, making it easier to set up projects that require backend functionality without frontend components. ### How? - Added the `--api` flag to the `create-next-app` command. - Modified the template to exclude unnecessary assets and dependencies. - Included exemplary usage of `route.js` features with comments for user guidance. - Implemented HTTP Methods and Parameters for request validation. Closes #68118 Closes NEXT-3633 Closes NDX-120 --------- Signed-off-by: Arindam Majumder <[email protected]> Co-authored-by: Mert Can Altin <[email protected]> Co-authored-by: Jiwon Choi <[email protected]> Co-authored-by: Tim_Z <[email protected]> Co-authored-by: Tim_Z <[email protected]> Co-authored-by: Ahmed Abdelbaset <[email protected]> Co-authored-by: Lee Robinson <[email protected]> Co-authored-by: Ephraim Atta-Duncan <[email protected]> Co-authored-by: Zack Tanner <[email protected]>