Fragrance Of Programming
In this post I will show you how to integrate an OWIN project with Angular CLI project.
Below are the pre-requisites:
After the project is successfully created, add new "cs" file and name it as Startup.cs and delete "Global.asax" file.
Add the below NuGet packages and it's dependencies into your project:
Now in the Startup.cs file, please add the below code.
Now modify the web.config as shown below
We are done with the Owin project, so now let's create the Angular CLI project.
I am creating the Angular project inside directory "AngularProject" and overall structure of Owin and Angular is as shown below
Now open powershell and browse to parent directory of AngularProject i.e. in my case its "c:\git". Now execute the below command
Once the Angular CLI project is created successfully, open ".angular-cli.json" and modify the outdir file location to the App folder which we created in the owin project.
Now build the angular project using "ng build -ec" and you will notice that all the build files are copied into App folder.
Now run the Owin project which we created and you will see the index.html of Angular project got rendered using owin.
Hope you enjoyed reading!!!!
Azure functions is the idea of events and code, developers will provide the Azure with a function or code and you till what event should trigger that function.
Azure Cloud Services: Developer can also use web roles or Worker roles. Web roles are used for hosting websites and web APIs, and Worker roles are designed for your background tasks, like processing queues and other batch work. So in cloud services all the environment related work is taken care by Microsoft and this model looks perfect for developers
Why do we need Azure Functions?
Server less doesn’t means there are no server involved, of course servers are involved but it’s abstract from the users/developers. But we delegate all the management of the server to Azure instead of us doing it. So we can purely focus on business requirement.
All the big enterprise application relies on the third party platform or backend. For example, for database we might use Azure DocumentDb and for authentication we might use some other third party platform. And with growing number of third party platform service, we might need to write our own custom backend code as per our requirement and that’s were Azure Functions comes to help us. So you can just tell the Azure function which events you need to respond to and you can write your own custom code. So with this comes a new term “Function as a Service (FaaS)”.