<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>meteor Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/meteor/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/meteor/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Wed, 22 Apr 2015 15:52:00 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>meteor Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/meteor/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Meteor JS on Clever Cloud</title>
		<link>https://www.clever.cloud/blog/engineering/2015/04/22/meteor-js-on-clever-cloud/</link>
		
		<dc:creator><![CDATA[Arnaud Lefebvre]]></dc:creator>
		<pubDate>Wed, 22 Apr 2015 15:52:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[meteor]]></category>
		<category><![CDATA[Nodejs]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2015/04/22/meteor-js-on-clever-cloud/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="meteor banner wide 1" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1-1368x528.jpg 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>Lately, a lot of developpers asked us about Meteorjs support on Clever Cloud. This is indeed a growing technology out there, so I decided to test it myself.</p>
<span id="more-2797"></span>

<h3 id="what-is-meteorjs-">What is Meteorjs ?</h3>
<p>Meteor.js is based on Nodejs and is a real-time cross-platform web application framework (Web, Android and iOS). One of its main features is to automatically propagate data changes to clients in real-time or even query the database from the client (well, the client has a cache of the database which will update the remote one). It is an easy framework to build reactive applications</p>
<h3 id="how-to-deploy-on-clever-cloud">How to deploy on Clever Cloud</h3>
<p>As an example of a large Meteor application, I will use <a href="https://github.com/TelescopeJS/Telescope">TelescopeJS</a>. It&#39;s a social news application you can configure the way you want. I&#39;ll use the version v0.14.2 since it does not require MongoDB 3.0. This is a version we will provide in a near future.</p>
<h4 id="1--clone">1- Clone</h4>
<p>So first, <code>git clone https://github.com/TelescopeJS/Telescope &amp;&amp; cd Telescope &amp;&amp; git checkout v0.14.2</code> and run it: <code>meteor run</code>. Then open <a href="http://localhost:3000">http://localhost:3000</a>, you should see the default page with some examples.</p>
<h4 id="2--install-and-build">2- Install and build</h4>
<p>To make it run on Clever Cloud, we have to make our own install script. This script will run when you deploy your application and build what&#39;s needed. Create an <code>install.sh</code> file and paste the following lines (or download it from <a href="https://raw.githubusercontent.com/CleverCloud/demo-meteorjs/master/install.sh">Github</a>):</p>
<pre><code class="language-bash">#! /bin/bash

# Current path
currentPath=$(realpath ./)

# Install Meteorjs
curl https://install.meteor.com/ | sh
export PATH=/home/bas/.meteor:$PATH

# Install demeteorizer
cd ~/ &amp;&amp; npm install demeteorizer

# Go back to our project
cd &quot;$currentPath&quot;

# Note: When using &quot;meteorhacks:npm&quot;
# to prevent the error: &quot;unknown package: npm-container&quot;
# (described in https://github.com/meteorhacks/npm/issues/49)
# uncomment the two following lines:
#meteor remove npm-container
#meteor run

# demeteorize the app
~/node_modules/.bin/demeteorizer -a &quot;my_app&quot; -o my_app/

# Go inside our demeteorized app to install modules
cd my_app/

# Install modules
npm install
</code></pre>
<p>This script will install Meteorjs on our platform, <a href="https://github.com/onmodulus/demeteorizer">demeteorize</a> the app (i.e. convert it as a regular node.js application) and install its modules. If you are using the package <a href="https://github.com/meteorhacks/npm">npm-container</a> from <code>meteorhacks</code>, you HAVE to uncomment lines 20 and 21 (this is not our case here). Do not forget to do a <code>chmod +x install.sh</code> to give it execution rights.</p>
<p>Now we have to create our package.json (which is the file which describe your application for NPM): <code>npm init</code>. Open it and create a <code>scripts</code> section:</p>
<pre><code class="language-javascript">&quot;scripts&quot;:{
  &quot;install&quot;: &quot;./install.sh&quot;,
  &quot;start&quot;: &quot;node my_app/main.js&quot;
}
</code></pre>
<p>(<code>my_app/main.js</code> is a file generated by demeteorizer, do not modify this line)</p>
<p>Then, you can commit your changes: <code>git add package.json install.sh &amp;&amp; git commit -m &quot;Clever Cloud setup&quot;</code></p>
<h3 id="configuration">Configuration</h3>
<p>Once done, we need to create a Node.js application and a MongoDB addon  and configure it. Open the <a href="https://console.clever-cloud.com">dashboard</a> and:</p>
<h4 id="addon">Addon</h4>
<ul>
<li>Add an addon</li>
<li>Select MongoDB, choose your plan and name it.</li>
<li>Click it in the blue pane on your left, go into its configuration tab and copy somewhere the <code>Connection URI</code> field</li>
</ul>
<h4 id="application">Application</h4>
<ul>
<li>Add an application</li>
<li>Choose node.js for the language</li>
<li>Choose the scalers you want (the default configuration is enough most of the time)</li>
<li>Name it</li>
<li>We don&#39;t need an addon since we&#39;ve just created it</li>
<li>Environment variables: You have to create 2 of them: ROOT_URL (url of you application) and MONGO_URL (the <code>Connection URI</code> field you saved)</li>
<li>Follow instructions to add the remote repository, <code>git push</code> and it will deploy.</li>
</ul>
<p>Your application should now be deployed, feel free to contact our support if you have any troubles!</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="meteor banner wide 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1.jpg 1400w, https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1-300x116.jpg 300w, https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1-1024x395.jpg 1024w, https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1-768x296.jpg 768w, https://cdn.clever-cloud.com/uploads/2021/08/meteor-banner-wide-1-1368x528.jpg 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>Lately, a lot of developpers asked us about Meteorjs support on Clever Cloud. This is indeed a growing technology out there, so I decided to test it myself.</p>
<span id="more-2797"></span>

<h3 id="what-is-meteorjs-">What is Meteorjs ?</h3>
<p>Meteor.js is based on Nodejs and is a real-time cross-platform web application framework (Web, Android and iOS). One of its main features is to automatically propagate data changes to clients in real-time or even query the database from the client (well, the client has a cache of the database which will update the remote one). It is an easy framework to build reactive applications</p>
<h3 id="how-to-deploy-on-clever-cloud">How to deploy on Clever Cloud</h3>
<p>As an example of a large Meteor application, I will use <a href="https://github.com/TelescopeJS/Telescope">TelescopeJS</a>. It&#39;s a social news application you can configure the way you want. I&#39;ll use the version v0.14.2 since it does not require MongoDB 3.0. This is a version we will provide in a near future.</p>
<h4 id="1--clone">1- Clone</h4>
<p>So first, <code>git clone https://github.com/TelescopeJS/Telescope &amp;&amp; cd Telescope &amp;&amp; git checkout v0.14.2</code> and run it: <code>meteor run</code>. Then open <a href="http://localhost:3000">http://localhost:3000</a>, you should see the default page with some examples.</p>
<h4 id="2--install-and-build">2- Install and build</h4>
<p>To make it run on Clever Cloud, we have to make our own install script. This script will run when you deploy your application and build what&#39;s needed. Create an <code>install.sh</code> file and paste the following lines (or download it from <a href="https://raw.githubusercontent.com/CleverCloud/demo-meteorjs/master/install.sh">Github</a>):</p>
<pre><code class="language-bash">#! /bin/bash

# Current path
currentPath=$(realpath ./)

# Install Meteorjs
curl https://install.meteor.com/ | sh
export PATH=/home/bas/.meteor:$PATH

# Install demeteorizer
cd ~/ &amp;&amp; npm install demeteorizer

# Go back to our project
cd &quot;$currentPath&quot;

# Note: When using &quot;meteorhacks:npm&quot;
# to prevent the error: &quot;unknown package: npm-container&quot;
# (described in https://github.com/meteorhacks/npm/issues/49)
# uncomment the two following lines:
#meteor remove npm-container
#meteor run

# demeteorize the app
~/node_modules/.bin/demeteorizer -a &quot;my_app&quot; -o my_app/

# Go inside our demeteorized app to install modules
cd my_app/

# Install modules
npm install
</code></pre>
<p>This script will install Meteorjs on our platform, <a href="https://github.com/onmodulus/demeteorizer">demeteorize</a> the app (i.e. convert it as a regular node.js application) and install its modules. If you are using the package <a href="https://github.com/meteorhacks/npm">npm-container</a> from <code>meteorhacks</code>, you HAVE to uncomment lines 20 and 21 (this is not our case here). Do not forget to do a <code>chmod +x install.sh</code> to give it execution rights.</p>
<p>Now we have to create our package.json (which is the file which describe your application for NPM): <code>npm init</code>. Open it and create a <code>scripts</code> section:</p>
<pre><code class="language-javascript">&quot;scripts&quot;:{
  &quot;install&quot;: &quot;./install.sh&quot;,
  &quot;start&quot;: &quot;node my_app/main.js&quot;
}
</code></pre>
<p>(<code>my_app/main.js</code> is a file generated by demeteorizer, do not modify this line)</p>
<p>Then, you can commit your changes: <code>git add package.json install.sh &amp;&amp; git commit -m &quot;Clever Cloud setup&quot;</code></p>
<h3 id="configuration">Configuration</h3>
<p>Once done, we need to create a Node.js application and a MongoDB addon  and configure it. Open the <a href="https://console.clever-cloud.com">dashboard</a> and:</p>
<h4 id="addon">Addon</h4>
<ul>
<li>Add an addon</li>
<li>Select MongoDB, choose your plan and name it.</li>
<li>Click it in the blue pane on your left, go into its configuration tab and copy somewhere the <code>Connection URI</code> field</li>
</ul>
<h4 id="application">Application</h4>
<ul>
<li>Add an application</li>
<li>Choose node.js for the language</li>
<li>Choose the scalers you want (the default configuration is enough most of the time)</li>
<li>Name it</li>
<li>We don&#39;t need an addon since we&#39;ve just created it</li>
<li>Environment variables: You have to create 2 of them: ROOT_URL (url of you application) and MONGO_URL (the <code>Connection URI</code> field you saved)</li>
<li>Follow instructions to add the remote repository, <code>git push</code> and it will deploy.</li>
</ul>
<p>Your application should now be deployed, feel free to contact our support if you have any troubles!</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
