Where do I put iron router?


#1

I can’t get router to work. Is this the right place for iron router and display template “home” when going to /home?

Router.route('/home');

if (Meteor.isClient) {
  
}

if (Meteor.isServer) {
  Meteor.startup(function () {
    // code to run on server at startup
  });
}

#3

You’ll want it inside (Meteor.isClient) or better yet, separate your js files with client/ and server/ directories.


#4

Thanks.

Btw, maybe this is a question more suited for stackoverflow? Not sure what I can ask here.


#5

Yeah, I think it’s more suited for stackoverflow.