Comments (8)
You mean like RESTful routes?
The problem is the story here isn't great. You can't even set a 404 😠
from guide.
You can in a regular RESTful route! You just can't set a 404 inside a server-side iron router route that returns the Meteor boilerplate.
But I don't think the story being bad should preclude us from adding it, right? I mean restivus is pretty good, and picker and json-routes are fine lower-level solutions.
from guide.
Oh, right good point. So the story is not great for SS routes that render client side stuff, but it's OK for "pure" SS routes for things like APIs.
I'm not sure where it should go. I don't know about a whole article on APIs. Maybe routing, or we could mention it in the methods article (although there's a lot in there already).
from guide.
We could add an article about integrating with other systems - like we could put the native DDP libraries in there, REST APIs, communicating through the database, etc.
from guide.
That could work.
On Wed, 21 Oct 2015 at 11:06 Sashko Stubailo [email protected]
wrote:
We could add an article about integrating with other systems - like we
could put the native DDP libraries in there, REST APIs, communicating
through the database, etc.—
Reply to this email directly or view it on GitHub
#49 (comment).
from guide.
But it does have the potential of increasing our workload by 6.67%. Is it worth it? I'm not really sure how to find out.
from guide.
@stubailo we have recently been looking at this issue and we a have come up with a pretty nice solution that were calling CRUD
, once the project has been cleaned up and documented ill come here and link you.
The main problem that we think we have solved is how to reuse one cursor for HTTP/Methods and Subscriptions.
Example: CRUD.bind('accounts', CRUD.TYPE_READ, {}, function() { return Accounts.find(); })
This READ
method is routed to a publication, method and and HTTP GET
endpoint called /rpc/accounts
.
A CRUD.TYPE_CREATE | CRUD.TYPE_UPDATE | CRUD.TYPE_DELETE
are only bound to methods and http endpoints.
The HTTP interface merges the query params and body data into a single options so that the handler function can do it's job regardless of the origin of the request.
Now we have REST functionality with Meteor socket based transports but only writing the procedure once.
If this is something that catches your interest and you want to get an early look at the work just email me or something.
Cheers.
from guide.
+1 for a full article on API / SS HTTP.
There are a lot of places where This would be tremendously useful,. while reactivity / websockets are amazing, I don't think throwing the baby out with bathwater is ever a good idea. In even a moderately sized application a few restful resources can be very useful, and I believe something that should be covered clearly and concisely in the meteor guide.
from guide.
Related Issues (20)
- [hexo] Cannot start local hexo server "unknown block tag: endraw"
- Link to OK Grow article for MongoDB Atlas oplog tailing no longer works HOT 2
- Add Windows getting started guide HOT 1
- Section 6 - Running on Mobile - 404 HOT 2
- Remove or improve the part about crosswalk HOT 3
- Add section about eager loading of files
- Can't use Tailwind CSS v2.0 because postcss@^8.0.9 is not supported by juliancwirko:postcss HOT 1
- Add page last updated date? HOT 1
- angular is not supported HOT 3
- Helmet Example Link is now a 404 HOT 4
- missing meteor test --drive-package information HOT 3
- Update testing section with Cypress HOT 2
- A list of meteor URLs needed to be added for a corporate proxy whitelist HOT 1
- Update Guide to explain 1.7's new lazy loading capabilities HOT 5
- Add testing with Cypress to the guide HOT 5
- Documentation error in the Meteor guide Method section. HOT 1
- Blank screen issue on android mobile with meteor version 1.7 HOT 2
- Improve Vue page HOT 1
- Action Required: Fix Renovate Configuration
- Add to TypeScript section HOT 4
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 guide.