- Install Node.js (use the latest v14 LTS release)
- To install the TeamsFx CLI, use the npm package manager:
npm install -g @microsoft/teamsapp-cli
- Create todo-list project.
teamsapp new sample todo-list-with-Azure-backend --interactive false
- Provision the project to azure. You will be asked to input admin name and password of SQL.
teamsapp provision
- Deploy.
teamsapp deploy
- Open env/.env.dev file, you could get the database name in
PROVISIONOUTPUT__AZURESQLOUTPUT__DATABASENAME
output. In Azure portal, find the database and use query editor with below query to create tables:CREATE TABLE Todo ( id INT IDENTITY PRIMARY KEY, description NVARCHAR(128) NOT NULL, objectId NVARCHAR(36), channelOrChatId NVARCHAR(128), isCompleted TinyInt NOT NULL default 0, )
- Refer to manually add user to add user in database.
- Once you have successfully created DB Table and added user, you can now try previewing the app running in Azure. In Visual Studio Code, open
Run and Debug
and selectLaunch Remote (Edge)
orLaunch Remote (Chrome)
in the dropdown list and PressF5
or green arrow button to open a browser.