Comments (2)
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.
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)
- RESTstop.apply donβt work HOT 3
- realtime live data using rest? HOT 2
- Raw Post Data HOT 4
- Readable JSON HOT 6
- * not working for catch-all route HOT 6
- Request Entity Too Large HOT 2
- Get reststop2 ready for Meteor 0.8.x (blaze) HOT 2
- Unexpected error. HOT 8
- Get 'Unknown error' when returning array of results
- if(this.params.user.indexOf('@') == -1) { "message": "Cannot call method 'indexOf' of undefined" HOT 2
- Signup call for account creation HOT 5
- srp removed from Meteor 0.8.2 HOT 7
- just add content-type if none present HOT 1
- login with reststop2 HOT 6
- bcrypt login problem HOT 2
- how to send data from client with json? HOT 3
- Add support for pluggable authentication
- POST XMLHttpRequest Failed HOT 2
- Sending File HOT 2
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 reststop2.