How to Add Permalinks to a Meteor Project

Originally published at: http://www.sitepoint.com/how-to-add-permalinks-to-a-meteor-project/
There’s no reasons for modern web applications to not have permalinks (also known as “pretty URLs”). They’re easier for users to remember, important for SEO, and when working with Meteor, extremely easy to implement.

To demonstrate how to create a basic permalinks system, we’re going to build a barebone blogging application. By default, each post will have a URL that contains the ID of the post like the following: http://localhost:3000/post/pCZLhbwqtGXPdTDMM.

This is the simplest approach, but the resulting URL isn’t very nice, so we’ll then learn how to replace that ID with a custom value. Our change will enable us to have a URL like this: http://localhost:3000/post/hello-world.

Along the way, we’ll also learn a couple of other tricks that’ll come in handy when building any kind of web application with Meteor. Let’s start!

Getting Started

Inside a new Meteor project, install Iron Router by running the command:
Continue reading this article on SitePoint

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.