Giter Club home page Giter Club logo

Comments (7)

johnpapa avatar johnpapa commented on May 10, 2024 1

@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.

manekinekko avatar manekinekko commented on May 10, 2024 1

@anthonychu this issue should be fixed in main . Feel free to close it.

from static-web-apps-cli.

anthonychu avatar anthonychu commented on May 10, 2024

@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.

manekinekko avatar manekinekko commented on May 10, 2024

@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.

johnpapa avatar johnpapa commented on May 10, 2024

@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.

manekinekko avatar manekinekko commented on May 10, 2024

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.

manekinekko avatar manekinekko commented on May 10, 2024

@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.

image

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.