title: Where do I put this line of code on the new file structure of Meteor?
body: <p>I am new to the Meteor JavaScript library and while I have a conceptual framework of how it works I wanted to get some real world experience with it. Unfortunately, the tutorials offered by Meteor.com and the actual code that currently downloads are completely different.</p>
  <p>It looks like originally, all the JS was on one file and now the server function and the rest of the JS is broken up into two separate files and I have been unable to find documentation that would guide me towards which one of the two new JS files do I add this piece of code to create my first collections:</p>
  <pre><code>Tasks = new.Mongo.Collection('tasks')
  </code></pre>
  <p>The client side main.js file looks like this:</p>
  <pre><code>import { Template } from 'meteor/templating';
  import { ReactiveVar } from 'meteor/reactive-var';
  
  import './main.html';
  
  Template.hello.onCreated(function helloOnCreated() {
    // counter starts at 0
    this.counter = new ReactiveVar(0);
  });
  
  Template.hello.helpers({
    counter() {
      return Template.instance().counter.get();
    },
  });
  
  // templates can have helpers which are just functions and events and this
  // particular event is a click event
  Template.hello.events({
    'click button'(event, instance) {
      // increment the counter when button is clicked
      instance.counter.set(instance.counter.get() + 1);
    },
  });
  </code></pre>
  <p>The server side main.js file:</p>
  <pre><code>import { Meteor } from 'meteor/meteor';
  
  Meteor.startup(() =&gt; {
    // code to run on server at startup
  });
  </code></pre>
  <p>Now with Meteor.js we cannot assume that it would go on the server side because the database can be accessed from everywhere on the front-end and the back-end. It's on the server of course, but it also runs on the browser in something called, Mini-Mongo. So does it: a) not matter in which JS file I put this piece of code, or b) go on the server side as best practice?</p>