我有一个带有;
的Windows系统cordova 7.0.1
ionic 3.3.0
npm 3.10.8
gulp 3.9.1
我正在尝试将Ionic Serve配置为localhost而不是0.0.0.0默认值,因为它返回Access Denied错误。在以前的版本中,我能够添加
"ank": "...",
"versionCheck": 1413143560174,
"ionicServeAddress": "localhost"
到离子配置文件,但似乎没有做任何事情。此外,我已经尝试做离子地址来改变它,但这似乎不是一个选项。
有没有办法配置默认地址而不在ionic serve命令中添加它?
编辑.ionic / config.json
{
"ank": "...",
"versionCheck": 1413143560174,
"ionicServeAddress": "localhost",
"lastCommand": "2017-06-05T22:15:31.825Z",
"urls": {
"api": "https://api.ionic.io",
"dash": "https://apps.ionic.io"
},
"user": {},
"tokens": {
"appUser": {},
"telemetry": "afac6034-bb58-4e95-9f1f-035a90625f05"
},
"cliFlags": {
"confirm": false,
"interactive": true,
"telemetry": true,
"yarn": false,
"timeout": true
}
}
我有一个运行的gulp任务
ionic serve
gulp serve命令的基本流程
deploy:watch (start)
clean:dest
preproccess (various)
gulp-notify: Generate bundle.js
copy: (various)
watch: (various)
deploy:watch (finish)
serve
Starting server: --port=8100 --p=8100 --livereload-port=35729 --r=35729 --address=0.0.0.0