I am new to Azure AD B2C and NodeJS development, but have developed web sites (that does not use frameworks) using JAVA, PHP, C# and C++ for non-cloud servers using Apache or IIS.
I want to build a simple SPA for Azure B2C, that accepts sign-in and sign-up (with federated authentication via google, facebook, etc) using the Authorization Code Flow.
After searching for some time, I found the following example:
What do they mean when they write the following in the Deployment section:
build your project
Are they assuming that I am using webpack or the like and forgot to describe it or are they assuming that I am familiar with Azure pipelines (which I am not), i.e. this:
Or do they mean something different? How do I build the sample project?
I have tested in my environment.
You can build and deploy your project to Azure Static Website using VS Code.
VS code Azure Storage extension builds and deploys the project to the Azure Storage as a static website
After cloning the project into your local, open command prompt from your project folder.
Run this command to install node modules required for the project :
Run this command to start the project :
You can see your project running in http://localhost:6420/
Now to deploy this application to Azure, you can use Azure Storage Account Static website feature.
To deploy the application, please follow below steps :
- Open your project from the VS code.
- Go to extensions and search for Azure Storage. Select Azure Storage. Click on install.
- Sign in to your Azure Account and you can see your subscription.
- Under Storage extension, Click on Deploy to Static Website via Azure Storage.
- Select your project folder. Select your Subscription.
- If storage account is already created, select your storage account. If not click on Create Storage Account (Advanced) and create your storage account.
- Click on Enable website hosting
- Once the deployment is completed, sign in to Azure Portal.
- Open your storage account. Select Containers. Open $web container.
- You can see your project uploaded to the Storage Account.
- Click on Change access level and select Container ( anonymous read access for containers and blobs). Click OK
- Open App folder and click on index.html. Copy the URL
- Open the URL in the browser and you should be able to see the application running.