Running Azure function as Windows Service for Debug purposes

Viewed 478

I have written an Azure (with http trigger method) function and it is hosted in Azure. However when I develop client applications which target the azure function I don't want to call the hosted Azure function, instead I am running the function from Visual studio and redirect the calls to this local copy.

Is there any way to keep this local copy running outside Visual studio environment in local machine? Perhaps like a windows service?

Any reference to an article would be great. Let me know if the question is not clear.

2 Answers

for running it locally you can use the following command template. I think using it inside Topshelf will run it inside a service

C:\projectFolderPathWithi hostJsonFile> C:\Users\username\AppData\Local\AzureFunctionsTools\Releases\3.16.1\cli_x64\func host start --port 7072 --verbose --functions "func1" "func2"

Related