I am trying to change my hosting env instead of localhost/
to something like www.example.com. I tried to change the the conf in my hosts file (sudo nano /private/etc/hosts
) and doing something like below and clear my DNS cache dscacheutil -flushcache
but did not work. am I missing something?
##
# 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
127.0.0.1 www.example.com
255.255.255.255 broadcasthost
::1 localhost
10.211.55.4 window10pro
127.0.0.1 AcronisDriveSearchPlugin
Note, I am using proxy config to redirect the url calls,
{
"/api": {
"target": "https://localhost:5001",
"secure": false
}
}
and I my script start in package.json
"scripts": {
"ng": "ng",
"start": "ng serve --ssl --proxy-config proxy.config.json",....
I call npm start
to serve my project