<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vuejs &#8211; Sibeesh Passion</title>
	<atom:link href="https://mail.sibeeshpassion.com/tag/vuejs/feed/" rel="self" type="application/rss+xml" />
	<link>https://mail.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Wed, 24 Jun 2020 08:50:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>Vuejs &#8211; Sibeesh Passion</title>
	<link>https://mail.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Create Microsoft Teams App Using Vuejs, Azure, JavaScript SDK</title>
		<link>https://mail.sibeeshpassion.com/create-microsoft-teams-app-using-vuejs-azure-javascript-sdk/</link>
					<comments>https://mail.sibeeshpassion.com/create-microsoft-teams-app-using-vuejs-azure-javascript-sdk/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Wed, 24 Jun 2020 08:39:50 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Azure DevOps]]></category>
		<category><![CDATA[develop custom apps for microsoft teams]]></category>
		<category><![CDATA[Microsoft teams]]></category>
		<category><![CDATA[microsoft teams app with vuejs]]></category>
		<category><![CDATA[Office 365]]></category>
		<category><![CDATA[Vuejs]]></category>
		<category><![CDATA[yeoman generator vuejs]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=14136</guid>

					<description><![CDATA[Create and connect our Teams application with Vuejs, a new Azure Web App, Create Build and Release pipeline for our Vuejs application and then install Tab App.]]></description>
										<content:encoded><![CDATA[
<p>[toc]</p>



<h2 class="wp-block-heading">Introduction</h2>



<p>The Microsoft Teams Yeoman generator is an amazing tool to develop applications for your Microsoft Teams, but it is not capable to work with Vuejs yet. I wanted to develop my application in Vuejs, so I created a Microsoft Teams app using Teams JavaScript SDK as <a href="https://sibeeshpassion.com/create-custom-web-apps-for-microsoft-teams-using-azure-function-node-js/">I explained in my previous post</a>. This blog is a continuation of the previous post, so please read that to get an idea of what we are going to develop in this blog post. </p>



<h2 class="wp-block-heading">Background</h2>



<p>In our last post, we developed,</p>



<ol class="wp-block-list"><li>a Microsoft Teams app with JavaScript SDK</li><li>an Azure Function to serve the static file as a website</li><li>Generate the manifest file for our Teams Application</li><li>Install the App in Teams</li></ol>



<p>And in this post we will be doing,</p>



<ol class="wp-block-list"><li>Create a sample Vuejs application</li><li>Connect our Microsoft Teams application with Vuejs application, at the end both are JavaScript right?</li><li>Create a new Web App in the Azure portal</li><li>Create Build pipeline for our Vuejs application</li><li>Create a release pipeline for our Vuejs application</li></ol>



<p>So do you like any of the point mentioned above? If yes, please stay with me till the end.</p>



<h2 class="wp-block-heading">Develop Microsoft Teams App with Vuejs</h2>



<h3 class="wp-block-heading">Setup Vuejs and create a new project</h3>



<p>The first thing to do is to install the Vue CLI on our machine, and you can do that by running the preceding command.</p>



<pre class="wp-block-code"><code>npm install -g @vue/cli</code></pre>



<p>Please read the <a href="https://cli.vuejs.org/guide/installation.html" target="_blank" rel="noreferrer noopener nofollow">installation guides here</a>, if you want to know it in detail. Once that is done, now is the time to create our first vuejs application using this command. </p>



<pre class="wp-block-code"><code>vue create hello-world</code></pre>



<p>You will be asked to select your preset, I select the default one, that is (babel, eslint). In the end, you will be given a beautiful, small Vuejs application. Easy right? As the motive of this blog post is not to talk about the Vuejs application, I won&#8217;t go in detail about it. </p>



<h3 class="wp-block-heading">Connect both Tab Apps and Vuejs app</h3>



<p>The Vuejs application has a folder called Public, and this is where we paste the files of our Teams Tab App. So now your public folder should look like below.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="261" height="313" src="https://sibeeshpassion.com/wp-content/uploads/2020/06/Public-Folder-in-Vuejs-1.png" alt="" class="wp-image-14138" srcset="/wp-content/uploads/2020/06/Public-Folder-in-Vuejs-1.png 261w, /wp-content/uploads/2020/06/Public-Folder-in-Vuejs-1-250x300.png 250w" sizes="(max-width: 261px) 100vw, 261px" /><figcaption>Public folder in Vuejs</figcaption></figure></div>



<p>Now open the Index.html file in the public folder and update the codes with our Tab App&#8217;s Index.html file, please remember that we are just adding some codes here, not replacing the complete HTML. Here is the complete Index.html file content.</p>



<script src="https://gist.github.com/SibeeshVenu/085b906722d1a80553197976f8d41a2d.js"></script>



<p>I have explained the Tab App&#8217;s code in my previous post, so reading that is still a good idea. Now let us go see the content of the config.html file, we are going to do some changes here. As I combined both Vuejs application and out Teams Tab app to one single application I thought to create an Azure Web App to host this application, instead of doing it with an Azure Function App as we did on the first blog. So here is your config.html file.</p>



<script src="https://gist.github.com/SibeeshVenu/d7fac90b5e28689254dc8a9347d317e7.js"></script>



<p>The only change that I did is changing websiteUrl, contentUrl in the code. We will be creating this website soon, no worries. We will have to do the changes in the manifest.json file too. Here is your manifest file.</p>



<script src="https://gist.github.com/SibeeshVenu/ebfdc823d1e474b87dc1d06b2cbd619e.js"></script>



<p>Please be noted that we have changed the configurationUrl and add our new URL to the validDomains. <strong>This step is very important</strong>.</p>



<h3 class="wp-block-heading">Create a Build Pipeline for Our App</h3>



<p>To create a build pipeline, go to your Azure DevOps and select your project, and then click on New Pipeline after clicking on the Pipelines section. You will be asked to select your repository and the pipeline configuration. As a configuration, select Node.js with Vue.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="918" height="505" src="https://sibeeshpassion.com/wp-content/uploads/2020/06/Nodejs-with-Vue.png" alt="" class="wp-image-14140" srcset="/wp-content/uploads/2020/06/Nodejs-with-Vue.png 918w, /wp-content/uploads/2020/06/Nodejs-with-Vue-300x165.png 300w, /wp-content/uploads/2020/06/Nodejs-with-Vue-768x422.png 768w, /wp-content/uploads/2020/06/Nodejs-with-Vue-425x234.png 425w" sizes="(max-width: 918px) 100vw, 918px" /><figcaption>Nodejs with Vue</figcaption></figure>



<p>And in the section &#8220;Review your pipeline YAML&#8221; replace the content with the below codes.</p>



<script src="https://gist.github.com/SibeeshVenu/098cbc3ec8655de89591a88b6d5c7e85.js"></script>



<p>Now all you have to do is to click Save and run button. You can already see that we are building our application, copying the artifacts from the dist folder to Build.ArtifactStagingDirectory and then publish it with the name www. Sounds good? So once the build is successful you should see your artifacts as preceding.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="955" src="https://sibeeshpassion.com/wp-content/uploads/2020/06/Buit-Artifact-Azure-Vuejs-1024x955.png" alt="" class="wp-image-14141" srcset="/wp-content/uploads/2020/06/Buit-Artifact-Azure-Vuejs-1024x955.png 1024w, /wp-content/uploads/2020/06/Buit-Artifact-Azure-Vuejs-300x280.png 300w, /wp-content/uploads/2020/06/Buit-Artifact-Azure-Vuejs-768x717.png 768w, /wp-content/uploads/2020/06/Buit-Artifact-Azure-Vuejs-425x397.png 425w, /wp-content/uploads/2020/06/Buit-Artifact-Azure-Vuejs.png 1150w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Build Artifact Azure Vuejs</figcaption></figure>



<p>Do you remember that we placed all of our Tab App related contents in the public folder of the Vue app? The artifacts generated will have those files too. Now we need to set up our Release pipeline, but before that, we should create an Azure Web App in the Azure portal.</p>



<h3 class="wp-block-heading">Create an Azure Web App</h3>



<p>Creating an Azure Web App is really straight forward, I am sure that you will be able to create one. Click on the New Resource and then search for Web App, provide all the information in the form you get now. Once everything is filled, review, and create. That&#8217;s it.  <strong>Remember to give the resource name as the name we gave in the manifest.json, config.html files</strong>.</p>



<h3 class="wp-block-heading">Create a Release Pipeline for Vue App</h3>



<p>As we already have an artifact ready, it is time to create a release pipeline. Go to the Pipelines section in your Azure DevOps and click on Releases, and then click on +New Release Pipeline.  Now select the artifacts you have, and select the Task Azure Web App Deploy. </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="442" src="https://sibeeshpassion.com/wp-content/uploads/2020/06/Azure-Web-App-Deploy-Task-1024x442.png" alt="" class="wp-image-14142" srcset="/wp-content/uploads/2020/06/Azure-Web-App-Deploy-Task-1024x442.png 1024w, /wp-content/uploads/2020/06/Azure-Web-App-Deploy-Task-300x130.png 300w, /wp-content/uploads/2020/06/Azure-Web-App-Deploy-Task-768x332.png 768w, /wp-content/uploads/2020/06/Azure-Web-App-Deploy-Task-425x184.png 425w, /wp-content/uploads/2020/06/Azure-Web-App-Deploy-Task.png 1271w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Azure Web App Deploy</figcaption></figure>



<p>And here is how your Task should look like.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="804" src="https://sibeeshpassion.com/wp-content/uploads/2020/06/Azure-Web-App-Task-Details-1024x804.png" alt="" class="wp-image-14143" srcset="/wp-content/uploads/2020/06/Azure-Web-App-Task-Details-1024x804.png 1024w, /wp-content/uploads/2020/06/Azure-Web-App-Task-Details-300x235.png 300w, /wp-content/uploads/2020/06/Azure-Web-App-Task-Details-768x603.png 768w, /wp-content/uploads/2020/06/Azure-Web-App-Task-Details-425x334.png 425w, /wp-content/uploads/2020/06/Azure-Web-App-Task-Details.png 1403w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Azure Web App Task Details</figcaption></figure>



<p>Now click Save and run a new release. And if you check the release log, if everything goes well, this is how it should be.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="897" height="479" src="https://sibeeshpassion.com/wp-content/uploads/2020/06/Azure-Web-App-Deploy-Log.png" alt="" class="wp-image-14144" srcset="/wp-content/uploads/2020/06/Azure-Web-App-Deploy-Log.png 897w, /wp-content/uploads/2020/06/Azure-Web-App-Deploy-Log-300x160.png 300w, /wp-content/uploads/2020/06/Azure-Web-App-Deploy-Log-768x410.png 768w, /wp-content/uploads/2020/06/Azure-Web-App-Deploy-Log-425x227.png 425w" sizes="(max-width: 897px) 100vw, 897px" /><figcaption>Azure Web App Log</figcaption></figure>



<p>Now you should be able to visit your Azure web application and make sure that the index.html, config.html works fine. Because in our next step we are going to install our App in Teams. </p>



<h2 class="wp-block-heading">Install the Vue Tab App</h2>



<p>Now go to the public folder in your Vue application and select the files manifest.json, color.png, outline.png, and right click and create a Zip file. We will be uploading this Zip file in our Teams. If you are unsure how to do this, I have already explained that in <a href="https://sibeeshpassion.com/create-custom-web-apps-for-microsoft-teams-using-azure-function-node-js/#install-the-teams-app-in-teams">our previous blog</a>. Once after the installation, go to your Tab app and I am sure the Vuejs application will be loaded in the tab.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="937" src="https://sibeeshpassion.com/wp-content/uploads/2020/06/Team-Tab-App-Output-1024x937.png" alt="" class="wp-image-14146" srcset="/wp-content/uploads/2020/06/Team-Tab-App-Output-1024x937.png 1024w, /wp-content/uploads/2020/06/Team-Tab-App-Output-300x274.png 300w, /wp-content/uploads/2020/06/Team-Tab-App-Output-768x702.png 768w, /wp-content/uploads/2020/06/Team-Tab-App-Output-1536x1405.png 1536w, /wp-content/uploads/2020/06/Team-Tab-App-Output-425x389.png 425w, /wp-content/uploads/2020/06/Team-Tab-App-Output.png 1710w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Team Tab App Output</figcaption></figure>



<h2 class="wp-block-heading">Conclusion</h2>



<p>I hope this post was useful and you have learned the below things.</p>



<ol class="wp-block-list"><li>How to create a Vuejs application?</li><li>How to connect a JavaScript SDK Team Tab application with Vuejs app</li><li>How to create an Azure Web App?</li><li>How to create Build Pipeline for Vuejs app in Azure DevOps?</li><li>How to create Release Pipeline for Vuejs app in Azure DevOps?</li><li>How to install the new Vuejs Team Tab app in Microsoft Teams?</li></ol>



<p>There is also another way of doing this with the <a href="https://github.com/pnp/generator-spfx" target="_blank" rel="noreferrer noopener">Generator SPFX</a> , this will help you create the SharePoint web part in Vuejs and the same can be added to the Microsoft Teams as <a href="https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-web-part-as-ms-teams-tab?WT.mc_id=AZ-MVP-5001828">explained in this blog</a>.<strong> I may write about this on my next blog. Stay tuned</strong>.</p>



<h2 class="wp-block-heading">Source Code</h2>



<p>Please feel free to check out the repository <a href="https://github.com/SibeeshVenu/Microsoft-Teams-App-with-Vuejs-and-Azure" target="_blank" rel="noreferrer noopener">here</a>.</p>



<h2 class="wp-block-heading">About the Author</h2>



<p>I am yet another developer who is passionate about writing and video creation. I have written close to 500 blogs on my <a href="https://sibeeshpassion.com/" target="_blank" rel="noreferrer noopener">blog</a>. And I upload videos on my YouTube channels <a href="https://www.youtube.com/njanorumalayali" target="_blank" rel="noreferrer noopener">Njan Oru Malayali</a> and <a href="https://www.youtube.com/SibeeshPassion" target="_blank" rel="noreferrer noopener">Sibeesh Passion</a>. Please feel free to follow me.</p>



<ul class="wp-block-list"><li><a href="https://github.com/SibeeshVenu">GitHub</a></li><li><a href="https://medium.com/@sibeeshvenu">medium</a></li><li><a href="https://twitter.com/sibeeshvenu">Twitter</a></li></ul>



<h2 class="wp-block-heading">Your turn. What do you think?</h2>



<p>Thanks a lot for reading. Did I miss anything that you may think which is needed in this article? Could you find this post useful? Kindly do not forget to share your feedback.</p>



<p>Kindest Regards<br>Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/create-microsoft-teams-app-using-vuejs-azure-javascript-sdk/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
