Generate a Microsoft Teams application.
TODO: Add your documentation here
Head on over to Microsoft Teams official documentation to learn how to build Microsoft Teams Tabs or the Microsoft Teams Yeoman generator docs for details on how this solution is set up.
All required source code are located in the ./src folder:
clientclient side codeserverserver side codepublicstatic files for the web sitemanifestfor the Microsoft Teams app manifest
For further details see the Yo Teams documentation
The application is built using the build Gulp task.
npm i -g gulp-cli
gulp buildTo create the Microsoft Teams Apps manifest, run the manifest Gulp task. This will generate and validate the package and finally create the package (a zip file) in the package folder. The manifest will be validated against the schema and dynamically populated with values from the .env file.
gulp manifestUsing the yoteams-deploy plugin, automatically added to the project, deployment of the manifest to the Teams App store can be done manually using gulp tenant:deploy or by passing the --publish flag to any of the serve tasks.
Configuration is stored in the .env file.
To debug and test the solution locally you use the serve Gulp task. This will first build the app and then start a local web server on port 3007, where you can test your Tabs, Bots or other extensions. Also this command will rebuild the App if you change any file in the /src directory.
gulp serveTo debug the code you can append the argument debug to the serve command as follows. This allows you to step through your code using your preferred code editor.
gulp serve --debugYou can use the following flags for the serve, ngrok-serve and build commands:
--no-lintingor-l- skips the linting of Typescript during build to improve build times--debug- builds in debug mode--env <filename>.env- use an alternate set of environment files--publish- automatically publish the application to the Teams App store
The solution can be deployed to Azure using any deployment method.
- For Azure Devops see How to deploy a Yo Teams generated project to Azure through Azure DevOps
- For Docker containers, see the included
Dockerfile
To enable logging for the solution you need to add msteams to the DEBUG environment variable. See the debug package for more information. By default this setting is turned on in the .env file.
Example for Windows command line:
SET DEBUG=msteamsIf you are using Microsoft Azure to host your Microsoft Teams app, then you can add DEBUG as an Application Setting with the value of msteams.