Reputation: 9808
I created a Azure function and deployed my build ReactJS app on it:
I can find all the files in my /wwwroot
folder:
When I visit the URL I see:
What do I need to do to run my React app on Azure Function?
Upvotes: 3
Views: 5786
Reputation:
I guess your goal is to run a static website in a serverless way. While it is possible to serve files from Functions, a better way is to store the website files in Blob Storage static website hosting. A reference architecture is available from Microsoft's documentation.
This video explains how to create a pipeline to deploy your files to Blob Storage.
You can then use Functions as a proxy to the files in Storage.
Upvotes: 7