May 2017
Intermediate to advanced
388 pages
7h 30m
English
On the server, we can run type checks with the given package:
import { check } from 'meteor/check';
Each time a method is called, we can check the type and the structure of the arguments passed to it. It is very similar to what we did on the frontend with the ReactProps:

On the method call, before inserting the data into the collection, we can verify if the types are correct. If any of the checks fail, the data won't be inserted. The client will receive a generic Error Match Failed, and the error will be logged on the server.
These types of check are fine, but they are not really useful if you want to keep ...
Read now
Unlock full access