microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
core/samples/CustomHosting/Program.cs
16lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using CustomHosting; |
| 5 | using Microsoft.Teams.Apps; |
| 6 | using Microsoft.Teams.Core.Hosting; |
| 7 | |
| 8 | WebApplicationBuilder webAppBuilder = WebApplication.CreateSlimBuilder(args); |
| 9 | // TODO: Show how to setup multiple Teams Bot applications (like how it was done in PABot) |
| 10 | webAppBuilder.Services.AddTeamsBotApplication<MyTeamsBotApp>(); |
| 11 | WebApplication webApp = webAppBuilder.Build(); |
| 12 | |
| 13 | webApp.MapGet("/", () => $"Teams Bot App is running {TeamsBotApplication.Version}."); |
| 14 | webApp.UseBotApplication<MyTeamsBotApp>(); |
| 15 | |
| 16 | webApp.Run(); |
| 17 | |