Comments (7)
@manekinekko perhaps just choose a port that is not one of the Vue, React, or Angular ones. Any port should be fine
from static-web-apps-cli.
@anthonychu this issue should be fixed in main
. Feel free to close it.
from static-web-apps-cli.
@manekinekko Could you please take a look at this? Would like to use this as the sample app to provide the VS Code folks to work on integrating debugging. Thanks.
from static-web-apps-cli.
@anthonychu I have this issue on my todo list for this week.
In the meantime, I am noticing that the API does not expose any GET method for listing products. Is that the expected behavior?
cc @johnpapa
from static-web-apps-cli.
@manekinekko - The repo @anthonychu is pointing to is the starting point for the learn module. So the GET API is not there yet, the learner will add it.
I noticed that react-app
was chosen, yet the port is 4200
. This is not the matching port that React is using in the github example. Not sure if that matters ... as it may just be the 4200 that the emulator is using and proxying the rest. But wanted to point it out
I have not been able to get the emulator/cli to work with monorepos like this. Looking forward to these changes! Thanks
from static-web-apps-cli.
Thank you @johnpapa
You are right about port 4200
, it is only the used internally by the static server of the cli. I know this might be confusing so I am gonna change all ports and use something different. Any suggestions?
When it comes to monorepo support, it's being tracked in this other issue. Would love to have your thoughts about this topic there if you have some time.
from static-web-apps-cli.
@anthonychu here is how you can temporarily launch the learn module example:
- clone branch #41 which adds support for selecting arbitrary folders + start sub command
- as @johnpapa mentioned you need to update the learn example and add the
GET /products
API. I did something dirty like this:
module.exports = async function (context, req) {
context.res.status(200).json(require('../shared/product-data').getProducts());
};
- then run the new swa command:
swa start react-app/build --api api-starter
(see discussion #26) - then access the default URL
http://localhost
and you should access the working app - I did a quick test, all CRUD operations are working as expected.
Let me know if you are still blocked. I hope we'll have a working release pipeline soon so we can publish alpha packages instead of having to go through all these steps again!
from static-web-apps-cli.
Related Issues (20)
- Wrongly reported Node compatibility HOT 8
- Wildcard routes aren't supported properly in config HOT 2
- Outdated dependencies with moderate severity security issues (CVE-2023-45857) HOT 1
- Deploy purely static pages to SWA without creating a `public` subfolder HOT 2
- Unable to deploy SWA from Ubuntu ( `ubuntu-latest` on Azure Pipelines Hosted Agent)
- Deploying Blazor WASM to Azure Static Web App from Visual Studio
- Azure Static Web Apps Cli command failing on Linux
- Flaky CLI deployment HOT 3
- swa-cli.config.json "run" field <undefined>when "npm run vite:dev". Vite never runs
- SWA CLI and Visual Studio debugger does not connect in Visual Studio 17.8.6 HOT 1
- Dependency on json.schemastore.org breaks CLI HOT 21
- Pipelines fail due to https://json.schemastore.org/staticwebapp.config.json network timeout HOT 2
- Failed to load staticwebapp.config.json schema. Continuing without validation! HOT 3
- Old Data API builder version used HOT 2
- Custom SWA roles don't work in Data API builder HOT 1
- Deploy fails with no feedback, application is not deployed, stuck in "Uploading" forever HOT 4
- `swa [login|deploy]` fails with `Cannot spawn a message bus without a machine-id` in devcontainer
- Error message unclear when trying to deploy a Function with unsupported Node version
- No errors at deployment when using runtime v4 with managed functions
- Cannot deploy if app dist folder or function project is in project root
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from static-web-apps-cli.