This project was created to help represent a fundamental app written with React. The Shop at Home theme is used throughout the app. View it live at https://www.shopathome.dev.
Learn how to Publish an Angular, React, Svelte, or Vue JavaScript app and API with Azure Static Web Apps
-
Create a repository from this template repository https://github.com/johnpapa/shopathome/generate
-
Enter the name of your new repository as my-static-web-app
-
Clone your new repository
git clone https://github.com/your-github-organization/my-static-web-app cd my-static-web-app/react-app
-
Install the npm packages
npm install
-
Run the app
npm run start-react-func-swa
-
Run the app
npm run start-react-fastify-swa
The app does not require authentication to launch or see the default page. However to view the products or discounts, the user must be authenticated using one of the options. These options are defined in the /public/staticwebapp.config.json
file.
Endpoint | Roles |
---|---|
/api/* | no auth |
/api/products/* | authenticated users |
/api/discounts/* | authenticated users with the preferred role |