Next.js Discord

Discord Forum

how to run a development server (tutorial)

Answered
piscopancer posted this in #help-forum
Open in Discord
Avatar
### Check your current IP by opening a console and typing a command ipconfig. You are going to get this output.
...
DNS-суффикс подключения . . . . . :
Локальный IPv6-адрес канала . . . : fe80::332c:7c80:a974:8875%11
+ IPv4-адрес. . . . . . . . . . . . : 192.168.1.41
Маска подсети . . . . . . . . . . : 255.255.255.0
Основной шлюз. . . . . . . . . : 192.168.1.1
...

Stick your attention to IPv4 and copy this address.

### Open package.json and make a replacement
    "scripts": {
        "dev": "next dev -H 192.168.1.41 -p 3000",
    },

🛑 Consider uppercase -H and lowercase -p. This is vital

# WOW. Now you are able to run a server and open it on your mobile
Answered by piscopancer
done
View full answer

1 Reply

Avatar
done
Answer