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.
- First, set up the route paths for the multiple pages. Create a subfolder called
router
in theboth
subfolder of your project. This can be...