Giter Club home page Giter Club logo

Comments (2)

hellogerard avatar hellogerard commented on August 28, 2024

The package and app are both calling configure.

Maybe we can tweak reststop to not automatically start until an explicit call to start by the application code - this way packages can add routes.

A more robust (difficult) solution could do away with the started flag and just be able to adapt to configuring and adding routes on the fly.

I think having an explicit 'start' call would work best. Browsing the code, I think this would work, though I'd have to try it out of course – bad thing is, it would break backwards compat. since older installs would now need to call 'start'.

As I type that, I'd really like to allow reststop to be used in other packages. So let me focus on option #1 – worst case is we require an explicit 'start' call, but maybe there's a way to fix it w/o any external changes.

from reststop2.

hellogerard avatar hellogerard commented on August 28, 2024

@schnie @calebl

Hey guys, re: this issue with having reststop in a package and in the app. I've modified things so that you can call configure at any time in the app. So it doesn't have to be before the 1st call to add. configure can only be called once. (I thought about allowing multiple calls to configure so an app could override, but it created a lot of complexity around keeping other config options consistent.)

I tested this locally, and it's working. Can you guys try it in your app? @schnie, you'll have to use the latest reststop2 master, but it shouldn't be an issue since the only new things since 0.5.5 are bug fixes.

from reststop2.

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.