如何使用VSCODE中的Teams Toolkit在现有团队应用程序中添加新的可辩论后端?
我生成了一个具有前端和机器人功能的新团队应用程序。
现在,我将添加一个后端来管理服务器逻辑。
我不会在机器人应用程序中这样做。
因此,我使用团队工具包添加新功能:
逻辑上我选择了Azure函数,因为我可以使用工具包工具部署所有我的应用程序组件。
现在,在我的项目目录中,我拥有sub-app:
我的问题是:
- 如何将此后端应用程序包含到
abound.json.json
和tasks.json
为了使其作为bot和前线的辩论 结尾 ?
//launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Remote (Edge)",
"type": "pwa-msedge",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "remote",
"order": 2
}
},
{
"name": "Launch Remote (Chrome)",
"type": "pwa-chrome",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "remote",
"order": 1
}
},
{
"name": "Attach to Frontend (Edge)",
"type": "pwa-msedge",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${localTeamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Backend",
"Attach to Bot"
],
"presentation": {
"group": "all",
"hidden": true
}
},
{
"name": "Attach to Frontend (Chrome)",
"type": "pwa-chrome",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${localTeamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Backend",
"Attach to Bot"
],
"presentation": {
"group": "all",
"hidden": true
}
},
{
"name": "Attach to Bot",
"type": "pwa-node",
"request": "attach",
"port": 9239,
"restart": true,
"presentation": {
"group": "all",
"hidden": true
}
},
],
"compounds": [
{
"name": "Debug (Edge)",
"configurations": [
"Attach to Frontend (Edge)",
"Attach to Bot",
],
"preLaunchTask": "Pre Debug Check & Start All",
"presentation": {
"group": "all",
"order": 2
},
"stopAll": true
},
{
"name": "Debug (Chrome)",
"configurations": [
"Attach to Frontend (Chrome)",
"Attach to Bot",
],
"preLaunchTask": "Pre Debug Check & Start All",
"presentation": {
"group": "all",
"order": 1
},
"stopAll": true
}
]
}
- 如何直接从工具包部署中部署它 工具
I generated a new teams app that has a front end and bot features.
Now I would add a backend to manage server logic.
I would not do that in the bot app.
So I used teams toolkit to add new feature:
Logically I have choosen azure functions, because I would be able to deploy all my app components using the toolkit tools.
Now in my project directory I have the the sub-app:
My questions are :
- How can I include this backend app to the
launch.json
andtasks.json
in order to make it debuggable as the bot and the front
end ?
//launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Remote (Edge)",
"type": "pwa-msedge",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "remote",
"order": 2
}
},
{
"name": "Launch Remote (Chrome)",
"type": "pwa-chrome",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "remote",
"order": 1
}
},
{
"name": "Attach to Frontend (Edge)",
"type": "pwa-msedge",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${localTeamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Backend",
"Attach to Bot"
],
"presentation": {
"group": "all",
"hidden": true
}
},
{
"name": "Attach to Frontend (Chrome)",
"type": "pwa-chrome",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${localTeamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Backend",
"Attach to Bot"
],
"presentation": {
"group": "all",
"hidden": true
}
},
{
"name": "Attach to Bot",
"type": "pwa-node",
"request": "attach",
"port": 9239,
"restart": true,
"presentation": {
"group": "all",
"hidden": true
}
},
],
"compounds": [
{
"name": "Debug (Edge)",
"configurations": [
"Attach to Frontend (Edge)",
"Attach to Bot",
],
"preLaunchTask": "Pre Debug Check & Start All",
"presentation": {
"group": "all",
"order": 2
},
"stopAll": true
},
{
"name": "Debug (Chrome)",
"configurations": [
"Attach to Frontend (Chrome)",
"Attach to Bot",
],
"preLaunchTask": "Pre Debug Check & Start All",
"presentation": {
"group": "all",
"order": 1
},
"stopAll": true
}
]
}
- How to make it deployable also directly from the toolkit deployment
tools
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当Azure函数添加到项目中时,
.vscode/laining.json
和.vscode/tasks.json
应自动更新以支持Debug Azure函数。你的案子很奇怪。无论如何,您可以使用以下.vscode/abougn.json
和.vscode/tasks.json
来调试您的应用程序。对于部署,请首先运行“在云中”,然后运行“部署到云”命令。
When Azure Functions is added to the project,
.vscode/launch.json
and.vscode/tasks.json
should be updated automatically to support debug Azure Functions. Your case is strange. Anyway, you can use following.vscode/launch.json
and.vscode/tasks.json
to debug your app.For deployment, run "Provision in the cloud" first, and then run "Deploy to the cloud" command.