Testing DNS and services on localhost

Type
Gist
Tags
Published
November 26, 2023
Author
Chetan Agrawal
 

Creating more loopback endpoints locally

sudo ifconfig lo0 alias 127.0.0.2 up

Update /etc/hosts file to point the domain to the new IP

## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost 127.0.0.2 app.local 127.0.0.3 host.local

Next JS command to run on above port

npx next dev -H 127.0.0.2 -p 3001