Soooo…. During my vacation I set out to test and deploy a NodeJS sample app for Microsoft Office 365 Teams to Azure.
I thought this would be a simple half hour journey, but it turned out I needed to learn some things on the way and fix a few ”glitches”.
I may be a bit of a rebellion, but I didn’t want to run the demo on my local environment (as described in the README), but rather test a ”real” deployment of an application that I (fictionally) had developed – well, it will hopefully turn into my application eventually.
I wanted to test authentication from Microsoft Teams into my own app, so I decided to use the sample project ”microsoft-teams-sample-complete-node” available on GITHUB. I thought everything would just work (except for some configuration issues), but things have probably changed along the way since the sample code was first published (two years ago), eventhough it was updated three months ago (fixing build errors).
This is what I had to do to get it up and running in an Azure App Container:
- Modify the ”.deployment” file, as I got an errormessage saying ”unable to find file deploy.cmd”
- Disable Oryx optimization for NODEJS builds on Azure because I recevied the error TS2688: Cannot find type definition file for node
- Add NodeJS Handlebar error.hbs file, so errors could be rendered correctly from the app.
- Fix NodeJS Handlebar error ”unable to find views/layouts/main.hbs”.
- Register app and specify API security options and register callback uri’s
During my endeavours I also had to learn how Azure portal worked, with it’s ”constant improvement” strategy, where things does not always work the way people have documented it previously. I didn’t want to mix and mash different tools, but decided I wanted to do everything using Azure Portal.
To be continued….