Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terrymun/nextjs-hostname
A repo that reproduces the issue that nextjs app cannot be served over a custom hostname
https://github.com/terrymun/nextjs-hostname
Last synced: 18 days ago
JSON representation
A repo that reproduces the issue that nextjs app cannot be served over a custom hostname
- Host: GitHub
- URL: https://github.com/terrymun/nextjs-hostname
- Owner: terrymun
- Created: 2023-09-14T09:11:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-14T09:24:27.000Z (over 1 year ago)
- Last Synced: 2024-12-01T12:25:26.207Z (22 days ago)
- Language: TypeScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a [Next.js](https://nextjs.org/) template to use when reporting a [bug in the Next.js repository](https://github.com/vercel/next.js/issues) with the `app/` directory.
## Getting started
Run `yarn` to install all necessary packages.
## Description of the bug
It seems like the `-H` (hostname) flag is not respect when spinning up the dev server.
Running the following command `next dev -p 4567 -H local.my-domain.com` will still cause Next.js to serve the page from `127.0.0.1:4567`` instead of the expected `local.my-domain.com:4567``:
```
yarn run v1.22.19
$ next dev -p 4567 -H local.my-domain.com
▲ Next.js 13.4.20-canary.28
- Local: http://127.0.0.1:4567
- Network: 127.0.0.1:4567✓ Ready in 2.6s
```The `package.json` has been updated so you can reproduce this by running `yarn dev`. I have verified that `local.my-domain.com` has been added to the `/etc/hosts` file. This used to work on earlier versions of next, but seems to be broken in the latest canary.