ryanthtra (5) [Avatar] Offline
#1
Important note: the schema instance methods in Listing 17.3 must be placed before the code where the model is set to the schema, or else when calling the instance method in Listing 17.5, the Node REPL will say that method "is not a function".

In brief, place the Listing 17.3 code above/before this line:

var Subscriber = exports.Subscriber = mongoose.model('Subscriber', subscriberSchema);
TheWexler (54) [Avatar] Offline
#2
Sorry for the confusion. That's correct. I'll make sure to emphasize that schema methods should appear before the line to export. Thanks!