Code Monkey home page Code Monkey logo

Comments (4)

kylef avatar kylef commented on June 9, 2024

I think this is going to be problematic when the arguments clash, i-e, both tools offer a -b, --help etc, and makes it difficult to show intuitive help. It would also make it difficult to determine unhandled arguments and raise an error if a user tries to use an option or subcommand that does not exist.

I'd propose that Curassow provides an API that you can use to serve instead of using the command line interface, so you're free to add whatever handling you want. How does this sound?

from commander.

czechboy0 avatar czechboy0 commented on June 9, 2024

You're right, that's definitely a better way to do it. Let me know when there's an issue on Curassow that I can track, thanks!

from commander.

kylef avatar kylef commented on June 9, 2024

Perhaps it makes sense to go into kylef-archive/Curassow#12. That way, you can make an instance of the arbiter and run it.

let arbiter = Arbiter<SyncronousWorker>(workers: 3, addresses: [], timeout: 20, application: app)
try arbiter.run()

from commander.

czechboy0 avatar czechboy0 commented on June 9, 2024

Hmm that's fair, but I really like how I didn't have to worry about such details with serve(). Maybe just add another overloaded version of serve, which will take those three parameters, in addition to the application? And then make the current serve run Commander and pass the params into the new one? That way I can just use the non-CLI version of serve, and I still don't touch the implementation details (as much anyway) of Curassow.

from commander.

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.