microsoft/teams.net

Public

mirrored from https://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
fbcdcb2c3b1b263fc5ce1ccd981d82f0a0520197

Branches

Tags

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

Clone

HTTPS

Download ZIP

core/samples/CustomHosting/Program.cs

16lines · 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();