can you provide some basic instructions of setting up, connecting and saving data on Mongodb from a .js file stored in the path imports/ui/pages/.js
From what I read so far it is important if the connection is from the server to the db or from the client to the db,my issue seems from client to the db, i tried a dummy example
const Posts = new Mongo.Collection(‘posts’);
Posts.insert({ title: ‘Hello world’, body: ‘First post’ });
and get
insert failed: Method ‘/posts/insert’ not found
can you give some instructions?I want to save some onclick input data of the user on the interface