static-web-apps-cli | Azure Static Web Apps CLI ✨ | Serverless library
kandi X-RAY | static-web-apps-cli Summary
kandi X-RAY | static-web-apps-cli Summary
The Static Web Apps CLI, also known as SWA CLI, serves as a local development tool for Azure Static Web Apps. It can:. Static Web Apps CLI is in preview. If you have suggestions or you encounter issues, please report them or help us fix them. Your contributions are very much appreciated. . The CLI emulates commonly used capabilities of the Azure Static Web Apps cloud service. Some differences are expected. Always deploy and test your apps in Azure to confirm behavior.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of static-web-apps-cli
static-web-apps-cli Key Features
static-web-apps-cli Examples and Code Snippets
Community Discussions
Trending Discussions on static-web-apps-cli
QUESTION
Does the Azure Static web apps CLI(Github link) support other HTTP methods than GET and POST? I'm trying to set up Azure Static web apps CLI on my local environment, and GET and POST requests to port 4280 works fine, but PUT and DELETE requests fails with the error:
UnhandledPromiseRejectionWarning: SyntaxError: Invalid regular expression: /^*$/: Nothing to repeat.
For testing I'm calling the endpoints from Postman, and if I try directly on the Azure function (running on the default port 7071), these work as expected. Is there some configuration I need to add to ensure SWA CLI forwards my PUT and DELETE requests to the Azure Functions?
Sample function.json that works on port 7071, but not through 4280:
...ANSWER
Answered 2022-Feb-10 at 19:20Turns out the solution is adding a staticwebapp.config.json file (sample allowing any user to run PUT and DELETE calls, even when not authenticated):
QUESTION
Having some issues with running a Azure Static Web App that I have cloned from GitHub. Trying to follow these instructions: https://docs.microsoft.com/en-us/azure/static-web-apps/local-development. I get the error: sh: 1: react-scripts: not found
after running npm run build
.
In the main project folder I ran this:
...ANSWER
Answered 2021-Nov-24 at 21:36After running npm i
everything workred out fine and I was able to run the app. Thanks to @AKX :)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install static-web-apps-cli
Install the cli npm install -g @azure/static-web-apps-cli
Open a SWA app folder at the root (outside any /api or /app folders): cd my-awesome-swa-app
Start the emulator: swa start
Access your SWA app from http://localhost:4280
Open a SWA app folder at the root (outside any /api or /app folders): cd my-awesome-swa-app
Start the emulator: npx @azure/static-web-apps-cli start
Access your SWA app from http://localhost:4280
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page