Book Image

Meteor Cookbook

By : Isaac Strack
Book Image

Meteor Cookbook

By: Isaac Strack

Overview of this book

Table of Contents (19 chapters)
Meteor Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a multipage application with Iron Router


Iron Router is an extremely useful Atmosphere package. It allows you to quickly and easily add multiple server pages to your Meteor project. This recipe will show you how to configure your project to use Iron Router.

Getting ready

You need to have Meteor installed. You will also need a blank Meteor project (see the Setting up your project file structure recipe in Chapter 1 , Optimizing Your Workflow).

Finally, you will need to add the Iron Router package to your Meteor project. You can reference the Adding Meteor packages recipe found previously in this chapter, or enter the following command in your terminal window, in the root folder of your project:

$ meteor add iron:router

How to do it…

We are going to create a very simple example of multiple pages and we will use a fresh blank project to do so.

  1. First, set up the route paths for the multiple pages. Create a subfolder called router in the both subfolder of your project. This can be done in...