Skip to content
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

Convert custom-server-express example to TypeScript #42110

Merged

Conversation

maxproske
Copy link
Contributor

@maxproske maxproske commented Oct 29, 2022

Converted Express example to TypeScript to match Contribution docs.

  • Added nodemon to match the custom-server example, and allow live reloading of server.ts
  • Updated README with explainer for non-standard <Link href="/a" as="/b"> routing

Documentation / Examples

  • Make sure the linting passes by running pnpm build && pnpm lint
  • The "examples guidelines" are followed from our contributing doc

@ijjk ijjk added the examples Issue/PR related to examples label Oct 29, 2022
@imranbarbhuiya
Copy link
Contributor

#33128 (comment)

@maxproske
Copy link
Contributor Author

maxproske commented Oct 29, 2022

#33128 (comment)

Thanks for the link! Though I think this example should be maintained as long as it's referenced by the Next.js custom server docs.

@maxproske
Copy link
Contributor Author

@leerob What do you think we should do with the following JavaScript examples?

I think they should be maintained and converted to TypeScript, however based on your comment #33128 (comment), it sounds like custom servers aren't recommended, and therefore the examples can't be updated. If this is the case, it might make sense to deprecate them in favour of the main custom-server example?

  • custom-server-actionhero
  • custom-server-express
  • custom-server-fastify
  • custom-server-hapi
  • custom-server-koa
  • custom-server-polka

@leerob
Copy link
Member

leerob commented Nov 6, 2022

I think we can remove them in favor of the custom server example 👍

Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice change 👍

@kodiakhq kodiakhq bot merged commit 48dbdf9 into vercel:canary Nov 6, 2022
kodiakhq bot pushed a commit that referenced this pull request Nov 7, 2022
Fixes @leerob's comment #42110 (comment)

~~Deprecated~~ Removed all custom server integration examples (Express, Fastify, etc.) in favour of the main `custom-server` example, ~~and left behind a helpful `README.md` in case they might be linked to.~~

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm build && pnpm lint`
- [X] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants