This example has been moved to the documentation: https://nextjs.org/docs/advanced-features/custom-server