Go Pro Sign Up Login

Buy Now and unlock this series

yours forever

Become a Pro and unlock everything




per month

Insert Permissions, Publishing & Meteor Toys

In this Intermediate Meteor video tutorial, I talk about adding allow permissions, publishing and subscribing and Meteor Toys a tool for seeing your information.Subscribe for more free tutorials https://goo.gl/6ljoFc, more Intermediate Tutorials here: https://goo.gl/11JLL8


Become a pro to download code and videos



almost 3 years ago [edited]

A minor difference is that now the collection has to be imported into the server/init.js file for the insert to actually work. Even after fixing the permission error with Recipes.allow() an error will appear:

  • function/recipes/insert is not found (404)

To fix it, just add the import for the Recipes.js file into server/init.js like so:

  • import './../collections/Recipes'

Also, the publish.js file also has to be imported into server/init.js so that the meteor.publish() function is called and the data is retrieved properly:

  • import './publish'

In the end, the file looks like this:

import { Meteor } from 'meteor/meteor';

import '../collections/Recipes.js'
import './publish'

Meteor.startup(() => {
  // code to run on server at startup

Want to join the conversation?

Become a Pro member today!