-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option for create-next-app
to create a headless API app.
#68118
Comments
The issue was marked with the This means that it is a good candidate for someone interested in contributing to the project, but does not know where to start. To get started, read the Contributing Guide. When you are ready, open a PR and link back to this issue in the form of adding Please remember to add tests to confirm your code changes will fix the issue and we do not regress in the future. If you have any questions, feel free to ask below or on the PR. Generally, you don't need to Note There is no need to ask for permission "can I work on this?" Please, go ahead if there is no linked PR 🙂 |
Thank you all for the PR! |
Hey @devjiwonchoi Sure. @ephraimduncan Would like to Collaborate with me in my PR? Then we can work together |
Hi @Arindam200, I've taken a close look at your implementation, and while it's a good start, I believe there might be a more efficient path forward. My PR includes a number of additional features. It might be more practical to build upon my PR rather than adapting yours. This approach could save us time and effort, while still achieving our goal of providing a robust headless API template. I'm open to incorporating any ideas from you that could further enhance the template. Perhaps we could discuss which elements from your PR might complement my PR? |
@ephraimduncan I see you have added some good examples, thank you! Just to make us keep going, @Arindam200's PR was opened first and already has a review on it, so could @ephraimduncan migrate some of your work to @Arindam200's PR? #65924 was how we collaborated last time, you can check out how we worked together. 😄 P.S. The credit will go to both of you as a co-author even if @Arindam200's PR is merged! |
@devjiwonchoi Sure. That would be great 👍🏼 |
That's fine. I'll collaborate with @Arindam200 to get this done |
@ephraimduncan @devjiwonchoi I reviewed your implementation and I think adding an example in the |
@Tim-Zj You are more than welcome! |
Sure thing @devjiwonchoi ! I've invited you @Tim-Zj , Please accept the invite |
Thank you, @devjiwonchoi and @Arindam200! I appreciate the opportunity. I have accepted the invite and will get working on it right away |
@Arindam200 I have added |
This comment has been minimized.
This comment has been minimized.
@devjiwonchoi This issue is closed but not documented on create-next-app documentation. Is this in production ? How do we use it as of now so that we do not need to have react and react-dom installed for using nextjs as API ? |
@prashantchothani Sorry for the late response! The PR is on going at #68130. |
What is the update you wish to see?
Add a new option for
create-next-app
to create a headless API app.Requirements
--api
flag forcreate-next-app
to create a headless app.public/
,app/page.*
, etc.).@types/react
,react
, etc.).Things to Consider
react
andreact-dom
?Bonus
You are welcome to add more features to the headless API app.
For an example, input validation using
Zod
.Related Documents
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/create-next-app
Thank you for contributing to Next.js.
We are looking forward to your change and the positive impact it will have on the community!
UPDATE 2024AUG22
Expected Specs:
HTTPS on dev<-- exclude experimentalIf we need a mock API endpoint, we can use https://api.vercel.app (click the link to see the APIs).
The text was updated successfully, but these errors were encountered: