Peter Boomsma
Peter Boomsma

Reputation: 9808

How to run ReactJS app on Azure function?

I created a Azure function and deployed my build ReactJS app on it:

enter image description here

I can find all the files in my /wwwroot folder:

enter image description here

When I visit the URL I see:

enter image description here

What do I need to do to run my React app on Azure Function?

Upvotes: 3

Views: 5786

Answers (1)

user793891
user793891

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.

Reference architecture

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

Related Questions