如何更改`ionic serve`以使用localhost而不是IP?

时间:2017-01-15 01:57:49

标签: cordova ionic-framework

运行ionic serve会显示以下消息。但是,我在azure中登录了facebook,CORS只接受localhost。这是将IP地址更改为localhost的方法吗?

Running live reload server: http://192.168.0.5:35729
Watching: www/**/*, !www/lib/**/*, !www/**/*.map
√ Running dev server:  http://192.168.0.5:8100
Ionic server commands, enter:
  restart or r to restart the client app from the root
  goto or g and a url to have the app navigate to the given url
  consolelogs or c to enable/disable console log output
  serverlogs or s to enable/disable server log output
  quit or q to shutdown the server and exit

1 个答案:

答案 0 :(得分:3)

ionic serve --address localhost应该有用。