microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
6594a29aa91c928c547a8821d305758bc8d340ed

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

core/samples/CustomHosting/Program.cs

17lines · modepreview

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using CustomHosting;
using Microsoft.Teams.Apps;
using Microsoft.Teams.Core.Hosting;

WebApplicationBuilder webAppBuilder = WebApplication.CreateSlimBuilder(args);

// TODO: Show how to setup multiple Teams Bot applications (like how it was done in PABot)
webAppBuilder.Services.AddTeamsBotApplication<MyTeamsBotApp>();
WebApplication webApp = webAppBuilder.Build();

webApp.MapGet("/", () => $"Teams Bot App is running {TeamsBotApplication.Version}.");
webApp.UseBotApplication<MyTeamsBotApp>();

webApp.Run();