
Meteor Cookbook
By :

Deploying to Meteor test servers is all well and good, but what if you want to use your own custom domain name? The folks at Meteor have created a simple way for you to do just that. This recipe will show you how to take advantage of this simple, yet powerful feature.
You will need to create a CNAME redirect to origin.meteor.com
on the hosting service where your domain is registered. How to do this varies pretty widely, so consult your hosting service's knowledge base on the exact steps. For this recipe, we'll use the cPanel interface of a hosting service for the packtpub.com
domain.
Enter the subdomain you wish to use in your CNAME redirect (for example, meteor.packtpub.com
) and set the redirect location to origin.meteor.com
. Click on Add CNAME Record to submit the record:
Let's assume the subdomain we're going to use is meteor.packtpub.com
. In order to deploy to the Meteor environment, perform the following steps:
$ meteor deploy meteor.packtpub.com
Deploying to meteor.packtpub.com. Bundling... Uploading... Now serving at meteor.packtpub.com
http://meteor.packtpub.com
) in a browser. If everything was deployed correctly, you will see your application up and running.This Meteor deployment feature is nearly identical to the default deployment, with just a little bit of extra code built in to interpret the origin of CNAME redirect.
When a request comes in to origin.meteor.com
via a CNAME redirect, Meteor takes the CNAME redirect's original destination and uses it as the unique identifier for the application deployment. Meteor also uses future requests to origin.meteor.com
from this CNAME redirect to serve the application.
In this particular case, the original CNAME destination was meteor.packtpub.com
. When the request is redirected to origin.meteor.com
, Meteor recognizes the CNAME redirect and uses it to direct traffic to the deployed application.
Change the font size
Change margin width
Change background colour