next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Convert `custom-server-express` example to TypeScript

Open maxproske opened this issue 3 years ago • 2 comments

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

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

maxproske avatar Oct 29 '22 02:10 maxproske

https://github.com/vercel/next.js/pull/33128#issuecomment-1009456136

imranbarbhuiya avatar Oct 29 '22 07:10 imranbarbhuiya

#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 avatar Oct 29 '22 15:10 maxproske

@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

maxproske avatar Nov 06 '22 19:11 maxproske

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

leerob avatar Nov 06 '22 21:11 leerob