As a newcomer to Meteor, I decided to delve into the Discove Meteor Book. However, I encountered some difficulties when trying to follow its instructions in Chapter 4 on collections:
- Initially, I struggled with opening two browser console windows simultaneously as instructed. It seemed that the system only allowed one console window to be active at a time.
- Subsequently, I proceeded with just one browser console window. Nevertheless, upon running Posts.findOne(), instead of retrieving
{title: "A new post", _id: LocalCollection._ObjectID}; it returned "undefined." This was perplexing as I had defined
; within posts.js file located under the lib folder, meant to work on both client and server sides.Posts = new Mongo.Collection('posts')
Can anyone shed light on why this is resulting in "Undefined"?