npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

microsoft-teams-app-sample

v0.1.4

Published

Microsoft Teams application sample.

Downloads

42

Readme


page_type: sample products:

  • office
  • office-teams
  • office-365 languages:
  • typescript
  • javascript
  • html description: "This sample demonstrates @fluentui/react-teams library in Microsoft Teams apps." extensions: contentType: samples createdDate: "12/8/2020 5:06:47 PM"

Deploying the Microsoft Teams UI templates sample app

This sample app can help you better understand how apps should look and behave in Microsoft Teams. The app includes examples of tested, high-quality UI templates that work across common Teams use cases (such as dashboards or forms).

To use the sample app, you need to host it somewhere. We'll focus on deploying the app to a local web server since that's the fastest way to get started.

(If you want to make it easier for others to use the app, consider deploying to Microsoft Azure or another hosting service.)

Prerequisites

Set up your app project

Open a terminal and clone the sample app repository.

git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
cd Microsoft-Teams-Samples/samples/tab-ui-templates/ts
yarn install

You can find the app source code in ./src:

  • app: Includes the app scaffolding.

  • manifest: Includes the app manifest (manifest.json) and the color and outline versions of the app icon.

  • assets: Includes the app assets.

  • .env: Contains the app configurations. When you create the app package, the manifest is dynamically populated with values from this file.

    [!NOTE] The .env file is excluded from source control. If you're deploying to Azure, make sure that you include the .env configurations as application settings in your Azure web app (except the PORT variable, which is used for local testing and debugging).

Run the app

  1. In the root directory of your project, run the following command.

    yarn start

    When the app starts, you should see the following terminal output.

      You can now view microsoft-teams-app-sample in the browser.
        Local:            http://localhost:3000
        On Your Network:  http://192.168.0.10:3000

    If you see a port number other than 3000, it's because the PORT environment variable in the .env file has a different value. You can use that port or change it to 3000.

  2. Open a browser and verify that all of the following URLs load:

Set up a secure tunnel to the app

Teams doesn't display app content unless it's accessible via HTTPS. We recommend using ngrok to establish a secure tunnel to where you're hosting the app locally (for example, http://localhost:3000).

  1. Install ngrok.

  2. Run the following command to create the tunnel to your localhost.

    yarn serve
  3. Save the HTTPS URL in the output (for example, https://468b9ab725e9.ngrok.io). You may need this later if you plan to register the app with App Studio.

[!IMPORTANT] If you're using the free version of ngrok and plan to share the app with others, remember that ngrok quits if your machine shuts down or goes to sleep. When you restart ngrok, the URL also will be different. (A paid version of ngrok provides persistent URLs.)

Create the app package

You need an app package to sideload the app in Teams.

  1. Open a separate terminal so that you don't interfere with the running app.

  2. Run the following command to generate the app package.

    yarn package

    This process validates the manifest and saves the package as a zip file in the package folder.

Sideload the app in Teams

  1. In the Teams client, go to Apps.

  2. Select Upload a custom app and upload the app package, which is the generated zip file in the package folder.

Enable logging

To view app logs, the DEBUG environment variable must be set to msteams. This is enabled by default in your project's .env file.

If disabled, run the following command in a terminal to see logs.

SET DEBUG=msteams

If you're hosting the app in Azure, set DEBUG to msteams in application settings.

For more information, read about the debug package.

Next steps