Git Product home page Git Product logo

Comments (4)

schultek avatar schultek commented on August 19, 2024

Thanks for looking into this. Maybe we can combine boach approaches by using webdev as a package and using the deamon api.

from jaspr.

schultek avatar schultek commented on August 19, 2024

When I run webdev as daemon, it serves the page just as the serve command does. The only difference is that the console output is in json.

from jaspr.

Balint66 avatar Balint66 commented on August 19, 2024

Yes, from the outside it does look like that it does nothing but the same as the serve but with json output.
But in the inside, it does more:

  1. Starts the daemon with the daemon domain, so in the beginning, only those commands, and the preregistered ones, like restart, can be executed.
  2. Validates the app, if it can be launched.
  3. Starts the DevWorkflow. This is where it starts the serving.
  4. Adds the app domain.
  5. Waits for the daemon to exit.

What's different, is that you can give it commands via jsonRPC on stdin. So, you can restart the app, stop the daemon, get it's version., and it will respond on stdout. Most things are documented on the flutter page, how one should attach to the process, the communication workflow.

I tried to pass more arguments than specified in the help, because in the code it looks like that the other arguments are passed to the mentioned workflow, so it wouldn't launch chrome, but the args parser wouldn't let me do it.

from jaspr.

schultek avatar schultek commented on August 19, 2024

Fyi the new cli uses the DevWorkflow directly.

from jaspr.

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.