cluster0:access-point

v0.1.24Published 3 weeks ago

cfs:access-point Build Status

This is a Meteor package used by CollectionFS.

You don't need to manually add this package to your app. It is added when you add the cfs:standard-packages package. You could potentially use your own access point package instead.

Define a URL for Collection Listing

To define a URL that accepts GET requests and returns a list of published files in a FS.Collection:

1Images = new FS.Collection("images", {
2 stores: [myStore]
3});
4
5FS.HTTP.publish(Images, function () {
6  // `this` provides a context similar to Meteor.publish
7  return Images.find();
8});

The URL will be '/cfs/record/images', where the cfs piece is configurable using the FS.HTTP.setBaseUrl method.

API Documentation

Here