Deploying a Meteor app, however bears a strong resemblance to deploying other kinds of software, is much easier, especially when you are familiar with working on websocket-based Node.js app. Since it is a must to bring your app into play after all of your effort to develop, I would love to dig deep into what you should take into consideration before deploying. In this blog, I am going to list some of essential stuff like this, including deployment environments, variables, domain name, SSL certificate and CDN.
1. M E T E O R ( H T T P S : / / B L O G . D E S I G N V E L O P E R . C O M / C A T E G O R Y / M E T E O R / )
2. What To Consider Before Deploying A Meteor App?
Deploying a Meteor app, however bears a strong resemblance to deploying other kinds of software, is much easier, especially when you are familiar with
working on websocket-based Node.js (https://nodejs.org/en/) app. Since it is a must to bring your app into play after all of your effort to develop, I would love to
dig deep into what you should take into consideration before deploying. In this blog, I am going to list some of essential stuff like this, including deployment
environments, variables, domain name, SSL certi cate and CDN.
Dep loy men t en v iron men t s
Deployment environments in Meteor includes three server tiers that are Development, Staging and Production:
Development: This is where you develop new features for the app and run local tests. If your app runs successfully with the code, it will move to the
Staging.
Staging: This environment is made to resemble Production environment but invisible to users. Here, your application will be checked on all features as
well as performance before being released.
Production: After your app goes through the test in Staging, it is of cially deployed for users to interact directly with.
Deployment environments are explained in great detail at:
https://guide.meteor.com/deployment.html#environments (https://guide.meteor.com/deployment.html#environments)
https://en.wikipedia.org/wiki/Deployment_environment (https://en.wikipedia.org/wiki/Deployment_environment)
En v iron men t variab les an d s et t in gs
Make sure environment variables and settings all are available for your deployment process.
Environment variables comprises a set of dynamic named values ENV_VARS such as MAIL_URL, MONGO_URL, ROOT_URL and NODE_OPTIONS. They
can affect the way running process which is, in this case, Meteor. Without environment variables, settings could not be con gured when running in
production.
One reliable destination for getting variables is https://nodejs.org/api/process.html#process_process_env
(https://nodejs.org/api/process.html#process_process_env)
B y Ly N g u y e n ( h t t p s : // b l o g . d e s i g n v e l o p e r. c o m / a u t h o r / l y - n g u y e n / ) o n J u l y 2 5 , 2 0 1 6
3. Settings help you store all the important information of your app in each environment and has the form of settings.json. You can create a settings.json
le and run it by using the command line meteor run --settings settings.json.
or put it into the METEOR_SETTINGS environment variable.
Domain n ame, S S L C er t i cat e an d C DN
Remember to register a domain name for your site, so that users can access to your site. Then, it is absolutely necessary for you to generate an SSL (Secure
Sockets Layer) certi cate.
CDN (Content Delivery Network or Content Distribution Network), in spite of being optional, should be set for your site. With CDN, content and images will be
delivered to end-users with a high quality and high performance
Read more at https://guide.meteor.com/deployment.html#cdn (https://guide.meteor.com/deployment.html#cdn).
That brings me to the end of this blog. In the next blog, I am going to show you How to deploy a Meteor app in reality
(https://blog.designveloper.com/2016/08/02/how-to-deploy-and-scale-your-meteor-apps/). Stay in touch and I will keep you updated.