我使用 nx monorepo 创建多个应用程序,但是当我尝试运行nx run-many一次启动所有应用程序时,却收到端口已被占用的错误,这是事实。
当我一次运行一个应用程序时,我可以指定一个端口,但run-many我不能。那么有没有办法为每个应用程序设置默认端口?
提前致谢。
我目前正在使用Google_Client api并想要获取用户名,电话,电子邮件和用户地址.
我设置了这些范围:
'https://www.googleapis.com/auth/plus.login',
'https://www.googleapis.com/auth/user.birthday.read',
'https://www.googleapis.com/auth/user.addresses.read',
'https://www.googleapis.com/auth/user.emails.read',
'https://www.googleapis.com/auth/user.phonenumbers.read'
Run Code Online (Sandbox Code Playgroud)
当我点击google登录时,它会询问正确的权限,然后我会使用Google提供的代码获取访问令牌.
获取我请求的令牌people_service和配置文件数据后,如下所示:
$token = $this->client->fetchAccessTokenWithAuthCode($_GET['code']);
$people_service = new \Google_Service_PeopleService($this->client);
$profile = $people_service->people->get(
'people/me',
array('personFields' => 'addresses,birthdays,emailAddresses,phoneNumbers')
);
Run Code Online (Sandbox Code Playgroud)
它返回一个Google_Service_PeopleService_Person对象.
但是,当我尝试使用它时,就像getPhoneNumbers()它返回一个 Call to undefined method Google_Service_PeopleService_Person::getNames()错误.
有什么问题,我该怎么办?
我正在构建一个webpack自动化工作流。我完成了开发服务器。我所有的开发配置都在webpack.config.js文件中。
然后,我package.json通过将其添加到脚本中'dev':'webpack-dev-server'
一个人如何在单独的文件中进行生产配置?