<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2019-05-18T00:36:00+00:00</updated><id>/feed.xml</id><title type="html">Kerry Gallagher</title><subtitle>Software Engineer • Climber • Yogi • Gamer • Ⓥ
</subtitle><entry><title type="html">Deploying an ember-cli application to Divshot</title><link href="/2015/03/04/deploying-an-ember-cli-application-to-divshot.html" rel="alternate" type="text/html" title="Deploying an ember-cli application to Divshot" /><published>2015-03-04T10:06:48+00:00</published><updated>2015-03-04T10:06:48+00:00</updated><id>/2015/03/04/deploying-an-ember-cli-application-to-divshot</id><content type="html" xml:base="/2015/03/04/deploying-an-ember-cli-application-to-divshot.html">&lt;p&gt;In this tutorial we’re going to deploy an ember-cli application to &lt;a href=&quot;https://divshot.com/&quot;&gt;Divshot&lt;/a&gt;. Divshot offers fully-featured Static Site hosting, backed by a CDN, CLI deployment and different environments.&lt;/p&gt;

&lt;p&gt;1) Head on over to &lt;a href=&quot;https://divshot.com/&quot;&gt;Divshot&lt;/a&gt; and click ‘Sign Up’. When you’re done you’ll be redirected to your dashboard.&lt;/p&gt;

&lt;p&gt;2) We’ll install Divshot’s CLI tools by running &lt;code class=&quot;highlighter-rouge&quot;&gt;npm install -g divshot-cli&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;3) Run &lt;code class=&quot;highlighter-rouge&quot;&gt;divshot login&lt;/code&gt; to authenticate with Divshot. You’ll be redirected to a webpage, follow the on-screen instructions.&lt;/p&gt;

&lt;p&gt;4) Create an Ember app by running &lt;code class=&quot;highlighter-rouge&quot;&gt;ember new &amp;lt;APP NAME&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;5) &lt;code class=&quot;highlighter-rouge&quot;&gt;cd&lt;/code&gt; in to your project’s root and run &lt;code class=&quot;highlighter-rouge&quot;&gt;npm install --save-dev ember-cli-divshot&lt;/code&gt; to install the ember-cli Divshot addon, this is a wrapper around Divshot’s CLI tools.&lt;/p&gt;

&lt;p&gt;6) Next run &lt;code class=&quot;highlighter-rouge&quot;&gt;ember generate divshot&lt;/code&gt;, this will create a &lt;code class=&quot;highlighter-rouge&quot;&gt;divshot.json&lt;/code&gt; file. You can either set the &lt;code class=&quot;highlighter-rouge&quot;&gt;name&lt;/code&gt; property in this file equal to the name of your Divshot app, or you can just auto-generate a new app on Divshot by running the command in the next step.&lt;/p&gt;

&lt;p&gt;7) Deploy the app by running &lt;code class=&quot;highlighter-rouge&quot;&gt;ember divshot push&lt;/code&gt;. This will also generate an app for you if it doesn’t exist. By default the development environment will be used, but you can specify another environment like so: &lt;code class=&quot;highlighter-rouge&quot;&gt;ember divshot push staging&lt;/code&gt;. The production environment is used for the &lt;code class=&quot;highlighter-rouge&quot;&gt;build&lt;/code&gt; step by default, this can also be changed like so: &lt;code class=&quot;highlighter-rouge&quot;&gt;ember divshot push --environment=development&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;8) You’ll receive output that looks like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;Application deployed to development
You can view your app at: http://&amp;lt;APP NAME&amp;gt;.divshot.io&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Great, that’s the app deployed. Feel free to navigate to that URL to see your application. You can also use a &lt;a href=&quot;http://docs.divshot.com/guides/domains&quot;&gt;custom domain&lt;/a&gt;, but that’s out of the scope of this tutorial.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This writing has kindly been sponsored by &lt;a href=&quot;https://twitter.com/pootsbook&quot;&gt;Pootsbook&lt;/a&gt; and &lt;a href=&quot;https://github.com/emberwatch&quot;&gt;Ember Watch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I want to read more articles like this:&lt;/p&gt;

&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;https://formkeep.com/f/0e0fbc4cd1a7&quot; method=&quot;POST&quot;&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;utf8&quot; value=&quot;✓&quot; /&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;article-title&quot; value=&quot;Deploying an ember-cli application to Divshot&quot; /&gt;
  &lt;input type=&quot;text&quot; name=&quot;name&quot; placeholder=&quot;Name&quot; /&gt;
  &lt;input type=&quot;email&quot; name=&quot;email&quot; placeholder=&quot;Email&quot; /&gt;
  &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;</content><author><name></name></author><summary type="html">In this tutorial we’re going to deploy an ember-cli application to Divshot. Divshot offers fully-featured Static Site hosting, backed by a CDN, CLI deployment and different environments.</summary></entry><entry><title type="html">Deploying an ember-cli application to Firebase</title><link href="/2015/03/02/deploying-an-ember-cli-application-to-firebase.html" rel="alternate" type="text/html" title="Deploying an ember-cli application to Firebase" /><published>2015-03-02T11:29:48+00:00</published><updated>2015-03-02T11:29:48+00:00</updated><id>/2015/03/02/deploying-an-ember-cli-application-to-firebase</id><content type="html" xml:base="/2015/03/02/deploying-an-ember-cli-application-to-firebase.html">&lt;p&gt;In this tutorial we’re going to deploy an ember-cli application to Firebase. &lt;a href=&quot;https://www.firebase.com/&quot;&gt;Firebase&lt;/a&gt; is a Backend as a Service provider that makes storing and using realtime data easy. They have libraries for all of the popular web and mobile platforms, failing that you can always fall back to the REST API too. We’ll be using &lt;a href=&quot;https://github.com/dhaulagiri/ember-cli-firebase-hosting&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;ember-cli-firebase-hosting&lt;/code&gt;&lt;/a&gt; in this tutorial, which is a wrapper around the official &lt;code class=&quot;highlighter-rouge&quot;&gt;firebase-tools&lt;/code&gt; package.&lt;/p&gt;

&lt;p&gt;1) Head on over to &lt;a href=&quot;https://www.firebase.com/&quot;&gt;Firebase&lt;/a&gt; and &lt;a href=&quot;https://www.firebase.com/signup/&quot;&gt;sign up&lt;/a&gt; (free for the ‘hacker’ plan). You’ll then be redirected to your Dashboard.&lt;/p&gt;

&lt;p&gt;2) An app, ‘My First App’, will be sat waiting for you. Feel free to customise the settings on this app. If you’ve already developed your app using Firebase you’ll have all of this setup already.&lt;/p&gt;

&lt;p&gt;3) Let’s make an Ember app, with &lt;code class=&quot;highlighter-rouge&quot;&gt;ember new &amp;lt;APP NAME&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;4) First we’ll install the official Firebase command line tools, run &lt;code class=&quot;highlighter-rouge&quot;&gt;npm install -g firebase-tools&lt;/code&gt;, which gives us access to the &lt;code class=&quot;highlighter-rouge&quot;&gt;firebase&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;5) &lt;code class=&quot;highlighter-rouge&quot;&gt;cd&lt;/code&gt; in to the root of your project and run &lt;code class=&quot;highlighter-rouge&quot;&gt;firebase login&lt;/code&gt; to authenticate with Firebase, follow the prompts.&lt;/p&gt;

&lt;p&gt;6) Run &lt;code class=&quot;highlighter-rouge&quot;&gt;npm install --save-dev ember-cli-firebase-hosting&lt;/code&gt; to install the ember-cli &lt;a href=&quot;https://www.firebase.com/docs/hosting/quickstart.html&quot;&gt;Firebase Hosting&lt;/a&gt; addon.&lt;/p&gt;

&lt;p&gt;7) Run &lt;code class=&quot;highlighter-rouge&quot;&gt;ember generate firebase-hosting&lt;/code&gt;, this will create a &lt;code class=&quot;highlighter-rouge&quot;&gt;firebase.json&lt;/code&gt; file for you. Running this is the equivalent of running &lt;code class=&quot;highlighter-rouge&quot;&gt;firebase init&lt;/code&gt;. If the app name in your Firebase dashboard doesn’t match your Ember app’s name, go ahead and change the &lt;code class=&quot;highlighter-rouge&quot;&gt;firebase&lt;/code&gt; property in the &lt;code class=&quot;highlighter-rouge&quot;&gt;firebase.json&lt;/code&gt; file. If in doubt about your app’s name just run &lt;code class=&quot;highlighter-rouge&quot;&gt;firebase list&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;8) Now we run &lt;code class=&quot;highlighter-rouge&quot;&gt;ember firebase deploy&lt;/code&gt; to deploy the app.&lt;/p&gt;

&lt;p&gt;9) You’ll receive some output that looks like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;Successfully deployed

Site URL: https://&amp;lt;APP NAME&amp;gt;.firebaseapp.com, or use firebase open&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Sweet, that’s the app deployed. Feel free to navigate to that URL to see your application. You can also use a &lt;a href=&quot;https://www.firebase.com/docs/hosting/guide/custom-domain.html&quot;&gt;custom domain&lt;/a&gt;, but that’s out of the scope of this tutorial.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This writing has kindly been sponsored by &lt;a href=&quot;https://twitter.com/pootsbook&quot;&gt;Pootsbook&lt;/a&gt; and &lt;a href=&quot;https://github.com/emberwatch&quot;&gt;Ember Watch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I want to read more articles like this:&lt;/p&gt;

&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;https://formkeep.com/f/0e0fbc4cd1a7&quot; method=&quot;POST&quot;&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;utf8&quot; value=&quot;✓&quot; /&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;article-title&quot; value=&quot;Deploying an ember-cli application to Firebase&quot; /&gt;
  &lt;input type=&quot;text&quot; name=&quot;name&quot; placeholder=&quot;Name&quot; /&gt;
  &lt;input type=&quot;email&quot; name=&quot;email&quot; placeholder=&quot;Email&quot; /&gt;
  &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;</content><author><name></name></author><summary type="html">In this tutorial we’re going to deploy an ember-cli application to Firebase. Firebase is a Backend as a Service provider that makes storing and using realtime data easy. They have libraries for all of the popular web and mobile platforms, failing that you can always fall back to the REST API too. We’ll be using ember-cli-firebase-hosting in this tutorial, which is a wrapper around the official firebase-tools package.</summary></entry><entry><title type="html">Making ember-deploy adapters</title><link href="/2015/02/26/making-ember-deploy-adapters.html" rel="alternate" type="text/html" title="Making ember-deploy adapters" /><published>2015-02-26T08:36:08+00:00</published><updated>2015-02-26T08:36:08+00:00</updated><id>/2015/02/26/making-ember-deploy-adapters</id><content type="html" xml:base="/2015/02/26/making-ember-deploy-adapters.html">&lt;p&gt;I recently published &lt;a href=&quot;https://github.com/Kerry350/ember-deploy-s3-index&quot;&gt;ember-deploy-s3-index&lt;/a&gt;, an S3 index adapter for &lt;a href=&quot;https://github.com/LevelbossMike/ember-deploy&quot;&gt;ember-deploy&lt;/a&gt; (&lt;a href=&quot;http://kerrygallagher.co.uk/the-making-of-ember-deploy-s3-index/&quot;&gt;Writeup&lt;/a&gt;). Whilst the documentation for ember-deploy is good, I thought I’d briefly talk about some of the things I found whilst building a custom adapter, to hopefully aid anyone building their own adapters.&lt;/p&gt;

&lt;h2 id=&quot;background&quot;&gt;Background&lt;/h2&gt;

&lt;p&gt;For context, ember-deploy is an ember-cli addon for deploying ember-cli applications. It has a nice architecture based on using different adapters for different deploy scenarios. You need to have two types of adapters, an index-adapter (which handles the &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file) and an assets-adapter (which handles the other assets). Read more about it on the &lt;a href=&quot;https://github.com/LevelbossMike/ember-deploy&quot;&gt;ember-deploy README&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;telling-ember-deploy-an-adapter-exists&quot;&gt;Telling ember-deploy an adapter exists&lt;/h2&gt;

&lt;p&gt;At the heart of it all, you’ll need to add &lt;code class=&quot;highlighter-rouge&quot;&gt;ember-addon&lt;/code&gt; to your &lt;code class=&quot;highlighter-rouge&quot;&gt;package.json&lt;/code&gt; keywords section as always. Then in your module’s main &lt;code class=&quot;highlighter-rouge&quot;&gt;index.js&lt;/code&gt; export we define the &lt;code class=&quot;highlighter-rouge&quot;&gt;type&lt;/code&gt; as &lt;code class=&quot;highlighter-rouge&quot;&gt;ember-deploy-addon&lt;/code&gt;, now ember-deploy will pick up on our adapter when looping through all of the ember addons in the project, .e.g:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;S3Adapter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'./lib/s3-adapter'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ember-deploy-s3-index'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ember-deploy-addon'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;

  &lt;span class=&quot;na&quot;&gt;adapters&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'S3'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;S3Adapter&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;defining-the-adapter&quot;&gt;Defining the Adapter&lt;/h2&gt;

&lt;p&gt;When you define your adapter it makes most sense to inherit from the base adapter class. You can import this like so: &lt;code class=&quot;highlighter-rouge&quot;&gt;var Adapter = require('ember-deploy/utilities/adapter');&lt;/code&gt;, this uses &lt;code class=&quot;highlighter-rouge&quot;&gt;extend()&lt;/code&gt; syntax.&lt;/p&gt;

&lt;p&gt;When your adapter is initially instantiated it’ll be passed a number of things. &lt;code class=&quot;highlighter-rouge&quot;&gt;manifestSize&lt;/code&gt; if one has been defined in the config, this sets the number of revisions you would like to exist before older ones are purged. A &lt;code class=&quot;highlighter-rouge&quot;&gt;taggingAdapter&lt;/code&gt; if one has been specified in the &lt;code class=&quot;highlighter-rouge&quot;&gt;deploy.json&lt;/code&gt; file, this would mean a custom &lt;code class=&quot;highlighter-rouge&quot;&gt;taggingAdapter&lt;/code&gt; has been specified, all &lt;code class=&quot;highlighter-rouge&quot;&gt;taggingAdapter&lt;/code&gt;s must specify one  method &lt;code class=&quot;highlighter-rouge&quot;&gt;createTag()&lt;/code&gt;, which you can use to tag your revisions in-line with the users’ needs. If a &lt;code class=&quot;highlighter-rouge&quot;&gt;taggingAdapter&lt;/code&gt; isn’t provided you can use the built in SHA based &lt;code class=&quot;highlighter-rouge&quot;&gt;taggingAdapter&lt;/code&gt; by requiring it like so: &lt;code class=&quot;highlighter-rouge&quot;&gt;var TaggingAdapter = require('ember-deploy/utilities/tagging/sha');&lt;/code&gt; and calling &lt;code class=&quot;highlighter-rouge&quot;&gt;createTag()&lt;/code&gt;. Lastly a &lt;code class=&quot;highlighter-rouge&quot;&gt;ui&lt;/code&gt; property is passed through that you can use to write out to the command line like so &lt;code class=&quot;highlighter-rouge&quot;&gt;this.ui.writeLine('A tasty message');&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;configuring-asset-urls&quot;&gt;Configuring Asset URLs&lt;/h2&gt;

&lt;p&gt;Another thing you’ll want to do when working with adapters like this is define a &lt;code class=&quot;highlighter-rouge&quot;&gt;fingerprint.prepend&lt;/code&gt; property in your &lt;code class=&quot;highlighter-rouge&quot;&gt;Brocfile.js&lt;/code&gt;. By default ember-cli will generate relative URLs, but as we’ll be storing our assets somewhere else these will be pretty useless. By defining this property our asset hosts’ URL will be prepended to the asset URLs within our &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;app&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;EmberApp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;fingerprint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;prepend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://s3-us-west-1.amazonaws.com/my-assets-bucket/'&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Other than that, everything is straight forward. Use your adapter within your &lt;code class=&quot;highlighter-rouge&quot;&gt;deploy.json&lt;/code&gt; file and away you go!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This writing has kindly been sponsored by &lt;a href=&quot;https://twitter.com/pootsbook&quot;&gt;Pootsbook&lt;/a&gt; and &lt;a href=&quot;https://github.com/emberwatch&quot;&gt;Ember Watch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I want to read more articles like this:&lt;/p&gt;

&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;https://formkeep.com/f/0e0fbc4cd1a7&quot; method=&quot;POST&quot;&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;utf8&quot; value=&quot;✓&quot; /&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;article-title&quot; value=&quot;Making ember-deploy adapters&quot; /&gt;
  &lt;input type=&quot;text&quot; name=&quot;name&quot; placeholder=&quot;Name&quot; /&gt;
  &lt;input type=&quot;email&quot; name=&quot;email&quot; placeholder=&quot;Email&quot; /&gt;
  &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;</content><author><name></name></author><summary type="html">I recently published ember-deploy-s3-index, an S3 index adapter for ember-deploy (Writeup). Whilst the documentation for ember-deploy is good, I thought I’d briefly talk about some of the things I found whilst building a custom adapter, to hopefully aid anyone building their own adapters.</summary></entry><entry><title type="html">Deploying an ember-cli application to Amazon S3</title><link href="/2015/02/20/deploying-an-ember-cli-application-to-amazon-s3.html" rel="alternate" type="text/html" title="Deploying an ember-cli application to Amazon S3" /><published>2015-02-20T15:24:16+00:00</published><updated>2015-02-20T15:24:16+00:00</updated><id>/2015/02/20/deploying-an-ember-cli-application-to-amazon-s3</id><content type="html" xml:base="/2015/02/20/deploying-an-ember-cli-application-to-amazon-s3.html">&lt;p&gt;In this article we’re going to deploy an Ember app to Amazon S3, we’ll be using ember-deploy, ember-deploy-s3 and ember-deploy-s3-index (disclaimer: I wrote the last one). If you haven’t read about the idea of ‘Lightning Fast Deploys’ I’d recommend &lt;a href=&quot;https://medium.com/@feifanw/framework-agnostic-fast-zero-downtime-javascript-app-deployment-df40cf105622&quot;&gt;doing so&lt;/a&gt; as it’s the idea behind ember-deploy. Let’s get stuck in.&lt;/p&gt;

&lt;p&gt;1) Sign up to &lt;a href=&quot;http://aws.amazon.com/&quot;&gt;Amazon’S AWS&lt;/a&gt; if you aren’t already a member.&lt;/p&gt;

&lt;p&gt;2) Log in to the &lt;a href=&quot;https://console.aws.amazon.com&quot;&gt;console&lt;/a&gt; and click &lt;code class=&quot;highlighter-rouge&quot;&gt;services&lt;/code&gt; -&amp;gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;S3&lt;/code&gt;. From here you can manage all of your buckets and so on. There are also desktop clients you can download or you could communicate via an API only.&lt;/p&gt;

&lt;p&gt;3) We’re going to make two buckets. One for managing our assets, and one for managing our &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; revisions. Click &lt;code class=&quot;highlighter-rouge&quot;&gt;Create Bucket&lt;/code&gt; and follow the instructions. One thing to note is that if you intend to serve your Ember app directly from the bucket and use a custom domain, your bucket must be named the same as the domain (minus the &lt;code class=&quot;highlighter-rouge&quot;&gt;www&lt;/code&gt;), you’ll also need a second bucket with the addition of &lt;code class=&quot;highlighter-rouge&quot;&gt;www&lt;/code&gt; and this will serve to redirect only. Amazon have &lt;a href=&quot;http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html&quot;&gt;thorough instructions&lt;/a&gt;. What we’re taking advantage of is Amazon’s ‘Static Website Hosting`. If you intend for the bucket to act as a storage mechanism only — call it anything you like!&lt;/p&gt;

&lt;p&gt;4) Great, so we now have two buckets. We’ll also need a user that can access and manipulate these buckets. We’ll use that users’ credentials (accessKeyId and secretAccessKey) to authenticate via ember-deploy. Click &lt;code class=&quot;highlighter-rouge&quot;&gt;services&lt;/code&gt; -&amp;gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;IAM&lt;/code&gt; -&amp;gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;Create New Users&lt;/code&gt; and create a user. You could just use your &lt;code class=&quot;highlighter-rouge&quot;&gt;root&lt;/code&gt; user but it’s nice to keep things separated. Make sure &lt;code class=&quot;highlighter-rouge&quot;&gt;Generate an access key for each user&lt;/code&gt; is ticked. You’ll now be presented with a screen where you can view your secret credentials, make sure you do and take a note of them, you won’t be able to view them again (it’s not the end of the world if you don’t, you’ll just need to create another set of keys).&lt;/p&gt;

&lt;p&gt;5) We’ll now assign an IAM policy to the user so that they have the rights to manipulate our bucket. Click your user in the IAM panel, and then click inline policies. You should see &lt;code class=&quot;highlighter-rouge&quot;&gt;There are no inline policies to show. To create one, click here.&lt;/code&gt;, click and then choose &lt;code class=&quot;highlighter-rouge&quot;&gt;Custom Policy&lt;/code&gt;, give it a name and put the following in the &lt;code class=&quot;highlighter-rouge&quot;&gt;Policy Document&lt;/code&gt; section:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-json&quot; data-lang=&quot;json&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Statement&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Action&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;s3:*&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Effect&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Allow&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Resource&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;arn:aws:s3:::&amp;lt;ASSETS BUCKET NAME&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;arn:aws:s3:::&amp;lt;ASSETS BUCKET NAME&amp;gt;/*&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;arn:aws:s3:::&amp;lt;INDEX BUCKET NAME&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;arn:aws:s3:::&amp;lt;INDEX BUCKET NAME&amp;gt;/*&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Hit &lt;code class=&quot;highlighter-rouge&quot;&gt;Apply Policy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;6) Now head back to the S3 panel. We’re going to add a bucket policy to our buckets to allow the files to be served publicly. Right click your bucket -&amp;gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;properties&lt;/code&gt; -&amp;gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;permissions&lt;/code&gt; -&amp;gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;Add bucket policy&lt;/code&gt;. Paste the following in:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-json&quot; data-lang=&quot;json&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Statement&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
			&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Sid&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;AllowPublicRead&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
			&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Effect&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Allow&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
			&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Principal&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
				&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;AWS&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;*&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
			&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
			&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Action&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;s3:GetObject&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
			&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Resource&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;arn:aws:s3:::&amp;lt;BUCKET NAME&amp;gt;/*&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And click &lt;code class=&quot;highlighter-rouge&quot;&gt;save&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;7) Our AWS resources should now be setup and configured. Let’s create an Ember app and get it deployed.&lt;/p&gt;

&lt;p&gt;8) Generate an Ember app with &lt;code class=&quot;highlighter-rouge&quot;&gt;ember new &amp;lt;app-name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;9) Install all necessary dependencies:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;npm install ember-deploy
npm install ember-deploy-s3
npm install ember-deploy-s3-index&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;10) Create a &lt;code class=&quot;highlighter-rouge&quot;&gt;deploy.json&lt;/code&gt; file in the root of your project&lt;/p&gt;

&lt;p&gt;11) Fill out your credentials (add a block for each environment):&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-json&quot; data-lang=&quot;json&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;development&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;store&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;S3&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;accessKeyId&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;key&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;secretAccessKey&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;key&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;bucket&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;index bucket&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;assets&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;s3&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;accessKeyId&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;key&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;secretAccessKey&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;key&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;bucket&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;assets bucket&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;12) Open up your &lt;code class=&quot;highlighter-rouge&quot;&gt;Brocfile.js&lt;/code&gt; file and add the following:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;app&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;EmberApp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;fingerprint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;prepend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'&amp;lt;YOUR ASSET BUCKET URL&amp;gt;'&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This is really important, without this the asset URLs that are generated will be relative, whereas we want them to point to our bucket. Your asset bucket URL will look something like this depending on region: &lt;code class=&quot;highlighter-rouge&quot;&gt;//&amp;lt;BUCKET NAME&amp;gt;.s3.amazonaws.com/&lt;/code&gt;. Remember the forward-slash as you’ll end up with things wrongly concatenated if you don’t.&lt;/p&gt;

&lt;p&gt;13) Make a change to your project, for the sake of this tutorial I’m just going to put a custom &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;title&amp;gt;&lt;/code&gt; in my &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;14) Commit those changes&lt;/p&gt;

&lt;p&gt;15) Deploy those changes with &lt;code class=&quot;highlighter-rouge&quot;&gt;ember deploy&lt;/code&gt;, this will deploy your assets and your index file revision. &lt;code class=&quot;highlighter-rouge&quot;&gt;ember deploy&lt;/code&gt; will also perform an &lt;code class=&quot;highlighter-rouge&quot;&gt;ember build&lt;/code&gt; using production level settings for things like asset url prepending (unless you specify otherwise). The revision number is based on commit SHAs by default.&lt;/p&gt;

&lt;p&gt;16) We can run &lt;code class=&quot;highlighter-rouge&quot;&gt;ember deploy:list&lt;/code&gt; to see all revisions&lt;/p&gt;

&lt;p&gt;17) Lets activate a revision by running &lt;code class=&quot;highlighter-rouge&quot;&gt;ember deploy:activate --revision &amp;lt;REVISION&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;18) An &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file will either be created with the contents of the revision or updated to match. Now you can either serve your &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file directly from your bucket (using Amazon’s static site hosting mode), or merely use this as a storage mechanism for your server to query.&lt;/p&gt;

&lt;p&gt;19) We’ll assume that you wanted to serve the app directly, and enable Static Site Hosting. Head back to the S3 panel in the AWS console. Right click your &lt;code class=&quot;highlighter-rouge&quot;&gt;index&lt;/code&gt; bucket and click properties. Now you want to match the settings seen here:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/2015/Feb/Screenshot-2015-02-19-11-01-00.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;code class=&quot;highlighter-rouge&quot;&gt;save&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;20) Head on over to the URL provided as &lt;code class=&quot;highlighter-rouge&quot;&gt;endpoint&lt;/code&gt;. You’ll see your Ember app! The specified revision is being served as your &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file, and if you view source you’ll see your generated absolute URLs pointing to your assets bucket. You can go on to configure your custom domain from here, but that is out of the scope of this tutorial.&lt;/p&gt;

&lt;p&gt;21) Would you like to serve your app directly from your bucket (no middle-man server) and have preview capabilities? Then this step is also necessary. We can’t serve previews directly from our index bucket as URLs like this: &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;BUCKET URL&amp;gt;.com/&amp;lt;REVISION&amp;gt;.html&lt;/code&gt; would break Ember’s router. Whilst it would be nice to specify multiple possible &lt;code class=&quot;highlighter-rouge&quot;&gt;index&lt;/code&gt; files to S3’s Static Site Hosting options, this isn’t possible. And messing with Ember’s &lt;code class=&quot;highlighter-rouge&quot;&gt;rootUrl&lt;/code&gt; is a terrible idea for this purpose. So what we’ll do instead is setup a third bucket - it’s okay this bucket will use all of the same setup as before, just copy and paste your policies and amend the IAM policy to have an extra bucket. You can think of this as your &lt;code class=&quot;highlighter-rouge&quot;&gt;staging&lt;/code&gt; bucket. You can amend your &lt;code class=&quot;highlighter-rouge&quot;&gt;deploy.json&lt;/code&gt; file like so:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&quot;staging&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;store&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;S3&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;accessKeyId&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;KEY&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;secretAccessKey&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;KEY&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;bucket&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;BUCKET&amp;gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;There’s no need for an &lt;code class=&quot;highlighter-rouge&quot;&gt;assets&lt;/code&gt; block in here as we’ll just be using &lt;code class=&quot;highlighter-rouge&quot;&gt;ember deploy:index&lt;/code&gt; with an &lt;code class=&quot;highlighter-rouge&quot;&gt;environment&lt;/code&gt; passed in.&lt;/p&gt;

&lt;p&gt;22) Let’s make some changes. And commit them.&lt;/p&gt;

&lt;p&gt;23) We can run &lt;code class=&quot;highlighter-rouge&quot;&gt;ember deploy --environment production&lt;/code&gt; to do an initial deploy. We store our assets and a revision in our production buckets (note: in earlier commands passing no environment would have used whatever you defined as development). First though we want to give this a thorough test on staging. Maybe send internally to team members? Possibly a client?. Run &lt;code class=&quot;highlighter-rouge&quot;&gt;ember deploy:index --environment staging&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;24) To preview this you have two options, they’re functionally identical but allow flexibility. You can activate the revision with &lt;code class=&quot;highlighter-rouge&quot;&gt;ember deploy:activate --revision &amp;lt;REVISION&amp;gt; --environment staging&lt;/code&gt;, and just keep your preview bucket’s static site hosting &lt;code class=&quot;highlighter-rouge&quot;&gt;index document&lt;/code&gt; option set to &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; or you can omit the activation stage and change the &lt;code class=&quot;highlighter-rouge&quot;&gt;index document&lt;/code&gt; option to match the revision itself, so it’ll be served directly:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/2015/Feb/Screenshot-2015-02-19-13-33-51.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;25) Once everyone is happy activate the same revision in production: &lt;code class=&quot;highlighter-rouge&quot;&gt;ember deploy:activate --revision &amp;lt;REVISION&amp;gt; --environment production&lt;/code&gt;. Grab a cup of tea and a slice of cake, because you’re done.&lt;/p&gt;

&lt;p&gt;Whilst the extra bucket may seem overly complicated it’s all kept simple with environments. We also keep the flexibility of a variety of use cases, to clarify they are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Serving directly from bucket with revisions but no previewing: assets bucket and index bucket&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Serving directly from bucket with revisions &lt;em&gt;and&lt;/em&gt; previews: assets bucket, index bucket and index previews bucket&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Serving from a backend server using the bucket as storage only, ability to use revisions and previews based on how you query the bucket: assets bucket and index bucket&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There’s absolutely no need here to have a backend server setup if you don’t need one. Or maybe you do but two completely different teams work on the front and back ends, communicating only over an API. Who knows! The ways apps are being built and consumed now are pretty endless.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This writing has kindly been sponsored by &lt;a href=&quot;https://twitter.com/pootsbook&quot;&gt;Pootsbook&lt;/a&gt; and &lt;a href=&quot;https://github.com/emberwatch&quot;&gt;Ember Watch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I want to read more articles like this:&lt;/p&gt;

&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;https://formkeep.com/f/0e0fbc4cd1a7&quot; method=&quot;POST&quot;&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;utf8&quot; value=&quot;✓&quot; /&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;article-title&quot; value=&quot;Deploying an ember-cli application to Amazon S3&quot; /&gt;
  &lt;input type=&quot;text&quot; name=&quot;name&quot; placeholder=&quot;Name&quot; /&gt;
  &lt;input type=&quot;email&quot; name=&quot;email&quot; placeholder=&quot;Email&quot; /&gt;
  &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;</content><author><name></name></author><summary type="html">In this article we’re going to deploy an Ember app to Amazon S3, we’ll be using ember-deploy, ember-deploy-s3 and ember-deploy-s3-index (disclaimer: I wrote the last one). If you haven’t read about the idea of ‘Lightning Fast Deploys’ I’d recommend doing so as it’s the idea behind ember-deploy. Let’s get stuck in.</summary></entry><entry><title type="html">The making of ember-deploy-s3-index</title><link href="/2015/02/20/the-making-of-ember-deploy-s3-index.html" rel="alternate" type="text/html" title="The making of ember-deploy-s3-index" /><published>2015-02-20T15:24:01+00:00</published><updated>2015-02-20T15:24:01+00:00</updated><id>/2015/02/20/the-making-of-ember-deploy-s3-index</id><content type="html" xml:base="/2015/02/20/the-making-of-ember-deploy-s3-index.html">&lt;p&gt;This week I published my first (public) npm module: &lt;a href=&quot;https://www.npmjs.com/package/ember-deploy-s3-index&quot;&gt;ember-deploy-s3-index&lt;/a&gt; which is an index adapter for &lt;a href=&quot;https://github.com/LevelbossMike/ember-deploy&quot;&gt;ember-deploy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There seems to be two front-runners in the ember-cli deployment world at the moment: &lt;a href=&quot;https://github.com/achambers/ember-cli-deploy&quot;&gt;ember-cli-deploy&lt;/a&gt; and &lt;a href=&quot;https://github.com/LevelbossMike/ember-deploy&quot;&gt;ember-deploy&lt;/a&gt;. ember-cli-deploy has been around longer, but I decided to build an adapter for ember-deploy. They’re both fantastic projects built on the premise of ‘Lightning Fast Deploys’. I chose ember-deploy because it seemed to have more participation in the creation of custom adapters, a &lt;a href=&quot;https://github.com/duizendnegen/ember-deploy-azure&quot;&gt;custom Azure index and assets adapter&lt;/a&gt; had already been contributed, and the default &lt;a href=&quot;https://github.com/LevelbossMike/ember-deploy-s3&quot;&gt;S3 assets adapter&lt;/a&gt; already existed.&lt;/p&gt;

&lt;p&gt;The architecture of both addons buys in to the concept of &lt;a href=&quot;https://www.youtube.com/watch?v=QZVYP3cPcWQ&quot;&gt;‘Lightning Fast Deploys’&lt;/a&gt;, which was a talk originally given at RailsConf. The idea is that your assets and static files are de-coupled from your backend code. Back in the day changing your front-end code meant waiting for your backend server to restart or compile assets or any other slew of operations — and it made no sense. Just as we should decouple web apps from their data source, the build pipeline and deployment strategy should be different, and catered, too. By default both addons work on the premise of placing your &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file revisions in a key-value store such as Redis (your index adapter), and your assets in some form of static storage (your assets adapter). By storing these revisions you have a great deal of flexibility. You can roll-back boo-boos and preview a revision of your web app without actually making it live to the world. Each revision will link to it’s own “snapshotted” and fingerprinted set of assets.&lt;/p&gt;

&lt;p&gt;ember-deploy-s3-index deviates from this idea slightly in that the &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; revisions are also placed in to static storage, rather than a key-value store. The default S3 assets adapter does upload your &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file for you, so if you were just looking for something to upload the base &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file for you, this would be overkill. This adapter aimed to deliver the entire revision and preview philosophy to S3.&lt;/p&gt;

&lt;p&gt;I figured with this approach the adapter could use one set of code, but the end user could use the files in two ways, either serve the &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt; straight from S3, or use it as storage for a proxy on a backend server.&lt;/p&gt;

&lt;p&gt;This is quoted from the repository README, but explains the two scenarios in-depth:&lt;/p&gt;

&lt;p&gt;“The idea with this adapter is you may want to serve your index.html file directly from a bucket, or you may have a backend server setup. Technically the default assets adapter does upload your index.html file, but this adapter works on the premise of having a bucket(s) dedicated to your index files, so that you can take advantage of the revisioning and previewing capabilities.&lt;/p&gt;

&lt;p&gt;The adapter leaves two methods of handling the index files open to you (implementation comes down to you). With direct serving the idea is you have set your index bucket up as a ‘static site’ and when people navigate to your website they’re hitting the bucket directly, and thus get served the index.html file contained within it. This is great if your Ember app relies on 3rd Party APIs, CORS or maybe doesn’t communicate with an API at all (games etc). You still have revisioning capabilities here for rollbacks etc, and previewing capabilities by using one extra bucket.&lt;/p&gt;

&lt;p&gt;proxy serving assumes you have a backend server setup of some kind, and are using S3 as a storage mechanism rather than the host itself. Using this mode you would query your S3 bucket directly, and serve the results, just like lookups with the default Redis adapter. On application boot you could query for the current implementation which would be that represented by index.html, store this in memory, and serve on consequent requests. If a revision was requested via a query parameter you can query the bucket for the revision &lt;app-name&gt;:&lt;sha&gt;.html and serve what's returned.&quot;&lt;/sha&gt;&lt;/app-name&gt;&lt;/p&gt;

&lt;p&gt;What I loved about this was that the techniques could be used for applications that didn’t care for, or necessarily have, a backend server. You could have revisioning and previewing capabilities on an Ember based game, for example.&lt;/p&gt;

&lt;p&gt;Despite working with node.js for almost two years now (one year in a professional capacity), I’ve never actually published a module. I’m sure that makes me some sort of anomaly. I’ve worked on plenty of internal / private modules though, and it’s always nice ‘n’ easy. One thing I’d recommend if you’re developing modules locally is &lt;code class=&quot;highlighter-rouge&quot;&gt;npm link&lt;/code&gt;, this allows project’s to use your local (unpublished) modules.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; &amp;lt;project dir&amp;gt;
npm link &amp;lt;module dir&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And this &lt;a href=&quot;https://docs.npmjs.com/cli/link&quot;&gt;sets up a set of symlinks for you&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In my projects &lt;code class=&quot;highlighter-rouge&quot;&gt;package.json&lt;/code&gt; I’ve always added: &lt;code class=&quot;highlighter-rouge&quot;&gt;&quot;&amp;lt;module name&amp;gt;&quot;:&quot;latest&quot;&lt;/code&gt; to use these local modules (there may be a nicer way of specifying them).&lt;/p&gt;

&lt;p&gt;Turns out publishing to npm is easy too.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; &amp;lt;module dir&amp;gt;
npm publish ./&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;I did need to run &lt;code class=&quot;highlighter-rouge&quot;&gt;npm adduser&lt;/code&gt; and follow the prompts first, this just makes npm &lt;a href=&quot;https://docs.npmjs.com/cli/adduser&quot;&gt;aware of you as a user&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And with that, my first npm module is out there. I hope it’s useful, and of course thanks to &lt;a href=&quot;https://github.com/LevelbossMike&quot;&gt;Michael Klein&lt;/a&gt; for ember-deploy itself. If you’d like to see a detailed walkthrough of how to setup your S3 buckets and actually deploy an Ember app to S3, with revisioning and previewing abilities, there’s an article &lt;a href=&quot;http://kerrygallagher.co.uk/deploying-an-ember-cli-application-to-amazon-s3/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This writing has kindly been sponsored by &lt;a href=&quot;https://twitter.com/pootsbook&quot;&gt;Pootsbook&lt;/a&gt; and &lt;a href=&quot;https://github.com/emberwatch&quot;&gt;Ember Watch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I want to read more articles like this:&lt;/p&gt;

&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;https://formkeep.com/f/0e0fbc4cd1a7&quot; method=&quot;POST&quot;&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;utf8&quot; value=&quot;✓&quot; /&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;article-title&quot; value=&quot;The making of ember-deploy-s3-index&quot; /&gt;
  &lt;input type=&quot;text&quot; name=&quot;name&quot; placeholder=&quot;Name&quot; /&gt;
  &lt;input type=&quot;email&quot; name=&quot;email&quot; placeholder=&quot;Email&quot; /&gt;
  &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;</content><author><name></name></author><summary type="html">This week I published my first (public) npm module: ember-deploy-s3-index which is an index adapter for ember-deploy.</summary></entry><entry><title type="html">Porting Ember Addons</title><link href="/2015/02/16/porting-ember-addons.html" rel="alternate" type="text/html" title="Porting Ember Addons" /><published>2015-02-16T20:41:36+00:00</published><updated>2015-02-16T20:41:36+00:00</updated><id>/2015/02/16/porting-ember-addons</id><content type="html" xml:base="/2015/02/16/porting-ember-addons.html">&lt;p&gt;I recently converted &lt;a href=&quot;https://www.twitter.com/gcollazo&quot;&gt;Giovanni Collazo&lt;/a&gt;’s &lt;a href=&quot;http://www.emberaddons.com/&quot;&gt;Ember Addons&lt;/a&gt; work to become &lt;a href=&quot;http://broccoliplugins.com/&quot;&gt;Broccoli Plugins&lt;/a&gt;. It’s these kind of things that make you realise how simple (in an elegant way, not a boring way) things can be. With excellent groundwork and foundations laid I was able to take somebody else’s project and get a different version up and running over 2 days. This was also an open-source contribution, something which, I’ll be honest, I’m a little scared of sometimes — there’s a lot of eyes out there!&lt;/p&gt;

&lt;p&gt;I really liked the way Giovanni tackled the problem of reading from the npm registry, and feeding that data in to an Ember app. One particular thing to note was that Ember Data wasn’t used, and Giovanni had implemented his own store and model feeding.&lt;/p&gt;

&lt;p&gt;On the backend there was a Node.js server set up, with two purposes. One was to run an &lt;code class=&quot;highlighter-rouge&quot;&gt;update.js&lt;/code&gt; script periodically — I chose once daily — that fetched plugins from the npm registry via keyword and saved them to a number of static &lt;code class=&quot;highlighter-rouge&quot;&gt;.json&lt;/code&gt; files on S3, also updating a metrics total in Postgres whilst there. Secondly, to provide a top-level redirect that would take you to the &lt;code class=&quot;highlighter-rouge&quot;&gt;plugins.json&lt;/code&gt; file, and a &lt;code class=&quot;highlighter-rouge&quot;&gt;/stats&lt;/code&gt; endpoint to read the metrics from Postgres. All of the paging was also worked out once the data was collected, and stored in their own &lt;code class=&quot;highlighter-rouge&quot;&gt;pages.json&lt;/code&gt; files.&lt;/p&gt;

&lt;p&gt;One thing this forced me to do was to re-learn some of Amazon S3 again — it’d admittedly been a while since I’d set anything up from scratch. Some nice discoveries were how easy it was to setup a policy to allow all files within a bucket to be publicly readable:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-json&quot; data-lang=&quot;json&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Statement&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Sid&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;AllowPublicRead&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Effect&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Allow&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Principal&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;AWS&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;*&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Action&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;s3:GetObject&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Resource&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;arn:aws:s3:::&amp;lt;BUCKET NAME&amp;gt;/*&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Also needed a CORS policy for good measure:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;CORSConfiguration&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://s3.amazonaws.com/doc/2006-03-01/&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;CORSRule&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;AllowedOrigin&amp;gt;&lt;/span&gt;*&lt;span class=&quot;nt&quot;&gt;&amp;lt;/AllowedOrigin&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;AllowedMethod&amp;gt;&lt;/span&gt;GET&lt;span class=&quot;nt&quot;&gt;&amp;lt;/AllowedMethod&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;MaxAgeSeconds&amp;gt;&lt;/span&gt;3000&lt;span class=&quot;nt&quot;&gt;&amp;lt;/MaxAgeSeconds&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/CORSRule&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/CORSConfiguration&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This is one of the beauties of single page apps in my eyes. Our backend can worry about being an API layer — of which it’s very good at doing so. And a completely separate app / repo can deal with the front-end. The two pair together like cheese and biscuits and everyone is happy. This forces you to think in an entirely different way about a number of problems. I find one of these is authentication, rather than “hacking” a cookie in to your Ember (or Backbone, Angular, React etc) layer and somehow sending that with XHR requests, you are forced to use solutions such as Access Tokens. That is an entirely, and MAHOOSIVE, problem all on it’s own though.&lt;/p&gt;

&lt;p&gt;On the front-end this feeds into a custom &lt;code class=&quot;highlighter-rouge&quot;&gt;store&lt;/code&gt;. The store itself as well as models are injected via an initializer:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;register&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'store:main'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;singleton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;register&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'model:package'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Package&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;singleton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;register&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'model:npm-user'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;NpmUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;singleton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;register&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'model:github-user'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;GithubUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;singleton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;register&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'model:github-repo'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;GithubRepo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;singleton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;application&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;inject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'route'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'store'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'store:main'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;application&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;inject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'controller'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'store'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'store:main'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;application&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;inject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'model'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'store'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'store:main'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If you haven’t used initializers for dependency injection it’s a great way to manage a variety of things. I’ve had great success injecting application wide notification and modal services this way. It’s also a great place to bake in your authentication and authorisation layer.&lt;/p&gt;

&lt;p&gt;Routes hook in to the &lt;code class=&quot;highlighter-rouge&quot;&gt;store&lt;/code&gt; as you would expect:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;store&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;findAll&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'package'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The &lt;code class=&quot;highlighter-rouge&quot;&gt;findAll()&lt;/code&gt; method does a &lt;code class=&quot;highlighter-rouge&quot;&gt;return this.find(model);&lt;/code&gt; for us. &lt;code class=&quot;highlighter-rouge&quot;&gt;find()&lt;/code&gt; itself delegates to internal private methods to either fetch the records in question (from the &lt;code class=&quot;highlighter-rouge&quot;&gt;.json&lt;/code&gt; file stored in S3), based on when the records were last fetched, or resolves them from its cached records.&lt;/p&gt;

&lt;p&gt;When records are fetched they pass through a custom ‘parse()’ method.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;_parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;repoRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;parseNpmUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;email&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;gravatarUrl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;gravatar&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'?s=30&amp;amp;d=retro'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;profileUrl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://npmjs.org/~'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createOrUpdateRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'npm-user'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;parseGithubUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;profileUrl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://github.com/'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createOrUpdateRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'github-user'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;userRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;parseGithubRepo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;repoRecord&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;repoRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;recordForId&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'github-user'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;repo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;repoRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;repo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;repo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;repoRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://github.com/'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;repoRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;repoRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;travisBadgeUrl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://travis-ci.org/'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;repo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'/'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;repo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repo&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'.svg?branch=master'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createOrUpdateRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'github-repo'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;repoRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;description&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;description&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;trim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createdAt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;created&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;modifiedAt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;modified&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;homePageUrl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;homepage&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;homepage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;homepage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;keywords&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;keywords&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;keywords&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;without&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'ember-data'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repositoryUrl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repository&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repository&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;repository&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;authorName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;author&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;author&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;_npmUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;owner&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;parseNpmUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;_npmUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;githubUser&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;parseGithubUser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;github&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;githubRepo&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;parseGithubRepo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;github&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;license&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;license&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bugUrl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bugs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bugs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bugs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;starredCount&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;starred&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;starred&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;downloadedCount&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;downloads&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;downloads&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;firstDownloadedAt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;downloads&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;lastDownloadedAt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;downloads&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;npmUrl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://www.npmjs.org/package/'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createOrUpdateRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'package'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pkgRecord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Pretty self-explanatory, it grabs the necessary information from the JSON payload and creates (or updates) a record based on it. What’s really nice to see though is how easy it can be to do something like this. Sometimes it can seem a little murky between a basic &lt;code class=&quot;highlighter-rouge&quot;&gt;ic-ajax&lt;/code&gt; implementation and full-blown Ember Data, but here we have a nice ‘n’ tidy implementation of a custom store.&lt;/p&gt;

&lt;p&gt;On the UI side there’s some sorting and filtering implemented. Whilst sorting and filtering can be considered part of your bread and butter, it’s always interesting to see how something is implemented. Should you sort, filter or page client side or server side? It always comes down to the project in hand, and how many records you’re dealing with. I found that parity between client and server side became much easier when the query params API landed. Which is in use here:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;queryParams&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'q'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;qpSort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'s'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;qpReverse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'r'&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Personally I’ve found by using query params and utilising the &lt;code class=&quot;highlighter-rouge&quot;&gt;metadata&lt;/code&gt; property in your payload you can achieve most things painlessly.&lt;/p&gt;

&lt;p&gt;Filtering is linked via an input box, which sets a &lt;code class=&quot;highlighter-rouge&quot;&gt;query&lt;/code&gt; property. Each item uses a separate item controller and observes for a change in &lt;code class=&quot;highlighter-rouge&quot;&gt;parentController.query&lt;/code&gt;. Which filters down like so:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;matchFilters&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;query&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'parentController.query'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;trim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toLowerCase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;query&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'-name'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'-owner'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'-description'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;property&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'-name'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'-owner'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'-description'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'parentController.query'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;readOnly&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This is then linked back to the template like so:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-handlebars&quot; data-lang=&quot;handlebars&quot;&gt;  &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Overall this was a really nice project to ‘port’, and I enjoyed looking through &lt;a href=&quot;https://www.twitter.com/gcollazo&quot;&gt;Giovanni Collazo&lt;/a&gt;’s work.&lt;/p&gt;

&lt;p&gt;Edit:&lt;/p&gt;

&lt;p&gt;The Store code wasn’t written by Giovanni, but &lt;a href=&quot;http://www.twitter.com/huafu_g&quot;&gt;Huafu Gandon&lt;/a&gt;, thank you for the clarification!&lt;/p&gt;

&lt;blockquote class=&quot;twitter-tweet&quot; lang=&quot;en&quot;&gt;&lt;p&gt;&lt;a href=&quot;https://twitter.com/Kerry350&quot;&gt;@Kerry350&lt;/a&gt; just want to clarify that the Store code was written by &lt;a href=&quot;https://twitter.com/huafu_g&quot;&gt;@huafu_g&lt;/a&gt;&lt;/p&gt;&amp;mdash; Giovanni Collazo (@gcollazo) &lt;a href=&quot;https://twitter.com/gcollazo/status/567446352175857664&quot;&gt;February 16, 2015&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;em&gt;This writing has kindly been sponsored by &lt;a href=&quot;https://twitter.com/pootsbook&quot;&gt;Pootsbook&lt;/a&gt; and &lt;a href=&quot;https://github.com/emberwatch&quot;&gt;Ember Watch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I want to read more articles like this:&lt;/p&gt;

&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;https://formkeep.com/f/0e0fbc4cd1a7&quot; method=&quot;POST&quot;&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;utf8&quot; value=&quot;✓&quot; /&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;article-title&quot; value=&quot;Porting Ember Addons&quot; /&gt;
  &lt;input type=&quot;text&quot; name=&quot;name&quot; placeholder=&quot;Name&quot; /&gt;
  &lt;input type=&quot;email&quot; name=&quot;email&quot; placeholder=&quot;Email&quot; /&gt;
  &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;</content><author><name></name></author><summary type="html">I recently converted Giovanni Collazo’s Ember Addons work to become Broccoli Plugins. It’s these kind of things that make you realise how simple (in an elegant way, not a boring way) things can be. With excellent groundwork and foundations laid I was able to take somebody else’s project and get a different version up and running over 2 days. This was also an open-source contribution, something which, I’ll be honest, I’m a little scared of sometimes — there’s a lot of eyes out there!</summary></entry><entry><title type="html">Deploying an ember-cli application to Heroku</title><link href="/2015/02/13/deploying-an-ember-cli-application-to-heroku.html" rel="alternate" type="text/html" title="Deploying an ember-cli application to Heroku" /><published>2015-02-13T10:09:23+00:00</published><updated>2015-02-13T10:09:23+00:00</updated><id>/2015/02/13/deploying-an-ember-cli-application-to-heroku</id><content type="html" xml:base="/2015/02/13/deploying-an-ember-cli-application-to-heroku.html">&lt;p&gt;In all honesty this post feels like a little bit of a cheat due to the great work by &lt;a href=&quot;https://github.com/tonycoco&quot;&gt;Tony Coconate&lt;/a&gt;. I recently needed to deploy an Ember CLI app to Heroku. Normally — in the land of Digital Ocean, Amazon EC2 instances et al — I’d install and configure Nginx to serve the static files.&lt;/p&gt;

&lt;p&gt;Life should be quick ‘n’ easy with a PaaS though, and it is. We can utilise one of &lt;a href=&quot;https://devcenter.heroku.com/articles/buildpacks&quot;&gt;Heroku’s Buildpacks&lt;/a&gt;. Buildpacks allow us to tell Heroku’s slug compiler how to execute our code: “At the heart of the slug compiler is a collection of scripts called a buildpack”.&lt;/p&gt;

&lt;p&gt;In this particular case Tony has put together an &lt;a href=&quot;https://github.com/tonycoco/heroku-buildpack-ember-cli&quot;&gt;Ember CLI Buildpack&lt;/a&gt; that handles the installation of Node, Nginx and generates a production build of your app. There’s also a bunch of really handy options for enabling HTTPS / SSL, handling authentication and so on. So let’s get an app deployed:&lt;/p&gt;

&lt;p&gt;1) Head on over to &lt;a href=&quot;https://www.heroku.com&quot;&gt;Heroku&lt;/a&gt; and sign up for free.
2) Next we’ll install the &lt;a href=&quot;https://toolbelt.heroku.com/&quot;&gt;Heroku Toolbelt&lt;/a&gt;, this gives us access to all of Heroku’s command line goodness. 
3) Once you’ve installed the Toolbelt you’ll want to authenticate with Heroku, run the following: &lt;code class=&quot;highlighter-rouge&quot;&gt;heroku login&lt;/code&gt; and follow the prompts. 
4) Now we’re ready to create our app Heroku side, run the following (in your app’s directory, and make sure you have a Github repo setup here for your app): &lt;code class=&quot;highlighter-rouge&quot;&gt;heroku create --buildpack https://github.com/tonycoco/heroku-buildpack-ember-cli.git&lt;/code&gt;
5) When you’re ready to deploy your app you just need to run &lt;code class=&quot;highlighter-rouge&quot;&gt;git push heroku master&lt;/code&gt;. And that’s it!&lt;/p&gt;

&lt;h2 id=&quot;what-does-it-do&quot;&gt;What does it do?&lt;/h2&gt;

&lt;p&gt;The Buildpack itself does a number of things for us (sometimes more, sometimes less depending on which options we’ve specified).&lt;/p&gt;

&lt;p&gt;During the setup process Node.js is installed from Heroku’s S3 mirror, Nginx is installed, configs are copied in to the relevant locations, PATH variables are defined, &lt;code class=&quot;highlighter-rouge&quot;&gt;node_modules&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;bower_components&lt;/code&gt; folders are handled (i.e. handling whether they may or may not have been checked in to source control), dependencies are installed (via npm and Bower) etc. Phew, and breathe!&lt;/p&gt;

&lt;p&gt;After the initial setup our application is built like so &lt;code class=&quot;highlighter-rouge&quot;&gt;node_modules/ember-cli/bin/ember build --environment $build_env&lt;/code&gt;, just as we would build it locally. The &lt;code class=&quot;highlighter-rouge&quot;&gt;/dist&lt;/code&gt; directory is then served via Nginx. There is an exhaustive configuration file that &lt;a href=&quot;https://github.com/tonycoco/heroku-buildpack-ember-cli/blob/master/config/nginx.conf.erb&quot;&gt;looks like this&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This writing has kindly been sponsored by &lt;a href=&quot;https://twitter.com/pootsbook&quot;&gt;Pootsbook&lt;/a&gt; and &lt;a href=&quot;https://github.com/emberwatch&quot;&gt;Ember Watch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I want to read more articles like this:&lt;/p&gt;

&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;https://formkeep.com/f/0e0fbc4cd1a7&quot; method=&quot;POST&quot;&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;utf8&quot; value=&quot;✓&quot; /&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;article-title&quot; value=&quot;Deploying an ember-cli application to Heroku&quot; /&gt;
  &lt;input type=&quot;text&quot; name=&quot;name&quot; placeholder=&quot;Name&quot; /&gt;
  &lt;input type=&quot;email&quot; name=&quot;email&quot; placeholder=&quot;Email&quot; /&gt;
  &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;</content><author><name></name></author><summary type="html">In all honesty this post feels like a little bit of a cheat due to the great work by Tony Coconate. I recently needed to deploy an Ember CLI app to Heroku. Normally — in the land of Digital Ocean, Amazon EC2 instances et al — I’d install and configure Nginx to serve the static files.</summary></entry><entry><title type="html">Year in Review (2014)</title><link href="/2014/12/22/year-in-review-2014.html" rel="alternate" type="text/html" title="Year in Review (2014)" /><published>2014-12-22T14:55:52+00:00</published><updated>2014-12-22T14:55:52+00:00</updated><id>/2014/12/22/year-in-review-2014</id><content type="html" xml:base="/2014/12/22/year-in-review-2014.html">&lt;p&gt;It’s been a relatively good year all in all, certainly much better than the couple before.&lt;/p&gt;

&lt;h1 id=&quot;new-job&quot;&gt;New Job&lt;/h1&gt;

&lt;p&gt;In March I left my job of 2.5 years at Audacious, and joined Blooie.&lt;/p&gt;

&lt;h1 id=&quot;conferences&quot;&gt;Conferences&lt;/h1&gt;

&lt;p&gt;In March I gave a workshop at jQuery UK. This was a pretty big deal for me. Not only is it the biggest front-end developer conference in the UK, not only was I being asked to give a workshop to a room full of people (I’ve never given a workshop…) but I had to try and appease my anxiety long enough to do it without freaking out. Thankfully, it went well! It was a great weekend, in fact. I got to see a conference from ‘the other side’ and met some truly lovely Americans who were over giving talks / workshops. Sitting in a ‘green room’ with the people you look up to and regularly learn from is quite a funny feeling.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/2014/Dec/workshop.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/2014/Dec/jqueryUK.JPG&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;magazines&quot;&gt;Magazines&lt;/h1&gt;

&lt;p&gt;This year I also had the chance to write for net magazine. I’ve never written for a magazine before, so that was a nice little privilege. My article was published in the Summer 2014 issue and my family seemed pretty proud to receive copies.&lt;/p&gt;

&lt;h1 id=&quot;puppy&quot;&gt;Puppy&lt;/h1&gt;

&lt;p&gt;By far the biggest news of the year was our little man Rupert. I have longed and wished for a dog for years. Since I was somewhere around the 7 year old mark I knew this dog would be a German Shepherd - I adore the breed. Their loyalty and love for their people is incredible. Around 3 years ago I knew this little guy would be called Rupert.&lt;/p&gt;

&lt;p&gt;I’d always wanted to rescue my first dog, but alas a lot of rescues seemed disinterested in those living in flats. So, we purchased a puppy from Munroegan GSDs in September instead. I was sick with excitement for around a month after I’d spoken to the breeder and chosen Rupert. On September 26th we went to collect him and it was the longest 2.5 hour trip in history. We had never met Rupert in person due to the breeder being in Sheffield. Instead we had opted for a Kennel Club Assured Breeder (not a magic bullet, but a good start), seeing pictures of the pups and Mum etc, seeing hip scores of the parents etc. The second I laid eyes on him I fell in love. Well, I’d already fallen in love with his pictures but this was that proper, soppy “I’ll never let anything hurt you” love.&lt;/p&gt;

&lt;p&gt;Me and Cam don’t want kids, that’s not our thing, I’m about as maternal as a mossy rock when it comes to humans. But I love my animals and Rupert is, for all intents and purposes, our “kid”. I’ve never owned a dog before, let alone a puppy, and they are incredibly hard work - but worth every single second.&lt;/p&gt;

&lt;p&gt;Some people get a bit offended when children are compared to puppies (apart from my awesome best friends who have both and agree the puppy was harder), but they are very similar. A puppy needs &lt;strong&gt;constant&lt;/strong&gt; supervision; they wake you up at 1am, 3am, 5am and whatever ams they feel like for a wee; they pee on the floor until you teach them not to; they put everything in their mouth; they whine and cry; they need you to teach them everything; they answer back sometimes; they play up and embarrass you sometimes; they chew things they shouldn’t; they teethe; they depend on you for everything. Whilst I don’t have kids having watched my baby brother be born and raised I know they’re remarkably similar…&lt;/p&gt;

&lt;p&gt;And it’s so worth it. He has nothing but love to give, I am greeted from a 5 minute trip in Tescos as though I left to do an army tour. I am incredibly fortunate in that I work from home full time, and this little man comes over to check in with me, grab some snuggles or places his head on my lap. We love him to bits. Every little success you have fills you with joy. I remember him learning ‘lie down’ for the first time, I remember him eating his first raw meal (after we stupidly put him on kibble after the breeder fed raw), I remember him conquering the stairs for the first time, I remember his first visit to playgroup, and so on. Every little moment has filled me with joy, this little furry life that depends on me is thriving and it’s such a wonderful feeling. Don’t get me wrong, he can flip in to ‘landshark GSD’ mode in a second and give your hand a good mouthing - but all of the good, far outweighs the bad.&lt;/p&gt;

&lt;p&gt;He graduated his KC Good Citizen ‘puppy foundation’ course last week, we were super proud of him. It was an easy course, and he knew everything on the syllabus (apart from ‘stand’) before we got there, but even so this paves the way for us trying for the KC Good Citizen Bronze Award in the New Year (which is &lt;strong&gt;much&lt;/strong&gt; harder). He’s such a clever boy, and rounding off for the year at 5 months he knows: Sit, Stand, Lie Down, Watch, Touch, Come, Stay, Leave It, Off, Drop It, Fetch, Paw, Spin and Play Dead.&lt;/p&gt;

&lt;p&gt;All in all, Rupert has improved our lives immensely. He gets us out of the house 2 - 3 times a day for walkies. He’s got us involved in all sorts of playgroups, training classes and group walks (he’s forcing me to conquer a little of my social anxiety). He loves us unconditionally. He brightens up the worst days. A doggy, especially a puppy, gives your life purpose which was definitely needed by me.&lt;/p&gt;

&lt;p&gt;I needed to work at the office for 2 days this month (Christmas party etc) and I missed him the entire time…&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/2014/Dec/ru1.jpg&quot; alt=&quot;&quot; /&gt;
&lt;img src=&quot;/assets/images/2014/Dec/ru2.jpg&quot; alt=&quot;&quot; /&gt;
&lt;img src=&quot;/assets/images/2014/Dec/ru3.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I can’t wait to see him grow in to an even more handsome, loyal, loving, playful furball.&lt;/p&gt;

&lt;p&gt;And those were the highlights of my year. I’m hopeful that 2015 is going to be a good year; three of my favourite people in the entire world are moving up North in February. Our visits will go from 1-2 a year to all-the-damn-time, and I can’t wait :)&lt;/p&gt;</content><author><name></name></author><summary type="html">It’s been a relatively good year all in all, certainly much better than the couple before.</summary></entry><entry><title type="html">Daemons</title><link href="/2014/08/25/daemons.html" rel="alternate" type="text/html" title="Daemons" /><published>2014-08-25T13:06:55+00:00</published><updated>2014-08-25T13:06:55+00:00</updated><id>/2014/08/25/daemons</id><content type="html" xml:base="/2014/08/25/daemons.html">&lt;p&gt;This month Robin Williams committed suicide. Robin had battled with addiction and depression all of his life. Understandably, the world mourned his passing - Robin was a great man, after all. The thing that disturbed me was some of the reactions to his death. People flocked to comment sections saying things like “He was famous, with a ton of money, a wife and a house. What did he have to be depressed about?”, these comments made me so, so sad. Actually, they made me angry and then sad. I felt sad because these are the sorts of attitudes that mental health sufferers come up against all the time. Knowing that this massive stigma still exists pains me. I thought I’d take the time to write a bit about my experience with andxiety and depression, if it helps even one person in any way at all then that’s good enough for me. Whilst the tone and overall conclusion of this post isn’t positive, even knowing that other people are “just like me” can make you feel less alone.&lt;/p&gt;

&lt;p&gt;Anxiety (and later depression) crept in to my life when I was around 13. I’d made some stupid decisions, I’d cut most of my hair off, and it made other kids say some pretty shitty things. It was when the bullying started. Welcome to secondary school, probably the most hateful period of my life. Unfortunately it was the period that shaped the rest of my life. I was a fat kid, I had this stupid short hair do, and kids were downright fucking cruel. My anxiety started to creep in at this point. It’s okay though, I still had friends. Or at least I thought it was okay (it wasn’t). By this point I was well aware that I was overweight and ugly.&lt;/p&gt;

&lt;p&gt;I didn’t just have the bullying at school fuelling my anxiety. My anxiety was being strengthened daily by learned behaviour at home. My Mum would hide from knocks at the door; she’d tell me and my brother to be quiet and to hide, so as to not alert them to someone being home. My Mum would hide from the phone, she’d proclaim to my step-dad that “she wasn’t home” and wouldn’t speak to anyone that called. I witnessed my Mum playing every trick in the book to avoid going to social gatherings. My Mum would constantly avoid any sort of confrontation. When I say confrontation I don’t mean proper confrontation, I don’t mean an argument or anything remotely intense. I’m referring to something like saying I didn’t like the new type of orange squash we’d bought. I’d be met with recourse such as “I’m sorry, I’m such a failure, I’ll try harder next time”. This led me down a path of never, ever even remotely negatively questioning anything - I didn’t want to upset anyone. Turns out that attitude doesn’t work in the real world when you’re an adult.&lt;/p&gt;

&lt;p&gt;I watched this for years. I didn’t think these things were normal, but over exposure had led me down a similar path. I didn’t answer the door. I hated speaking on the phone. I avoided social gatherings. The ones I did attend I had no idea how to act. I avoided telling people how I really felt, for fear of hurting that person.&lt;/p&gt;

&lt;p&gt;Somehow I met Cam, my fiance. This paved the way for an escape of sorts, a fresh start. When I was 18 I moved up to Newcastle to live with him, and to simultaneously attend university. These were the most miserable 3 years of my life. I made no friends, a few acquaintances of sorts, but no friends. I lived those 3 years seeing no one but Cam, and Cam’s friends. I attended, all in all, around 20% of my lectures etc. I would skip everything I could. I got email after email telling me that I would be kicked from the course, my reply was always “Am I failing the course?”. Of course, I knew I wasn’t. In fact I graduated with a 2:1, but I didn’t care. It was my wish to not attend the graduation ceremony, but Cam forced me to go - “it only happens once, after all”.&lt;/p&gt;

&lt;p&gt;So there I was. I’d graduated. I had a very expensive piece of paper to my name. No friends, anxiety at an all time high, and I’d now battled a couple of serious bouts of depression.&lt;/p&gt;

&lt;p&gt;Luckily I landed a job almost immediately in a tech startup as a web developer. For the first 6 months I’m fairly certain I didn’t speak other than to answer direct questions. I made some really good friends, but onyl because those people took the time to speak to me - not the reverse.&lt;/p&gt;

&lt;p&gt;Around 2 years in to that job a major bout of depression hit. I had to take a month off work to try and get my head straight. I spent that month crying, sleeping and clinging to my pillow for dear life. I honestly wanted to die. If it had ended at that point I’d have been happy.&lt;/p&gt;

&lt;p&gt;But it didn’t. I came out of the other end, albeit broken and at my wits end. At this point I pursued the medical route. I was prescribed anti-depressants and did a course of CBT (Cognitive Behavioural Therapy). I never noticed the anti-depressants helping all that much, but I attended every one of my CBT meetings. I “graduated” my CBT course, for some ridiculous reason I thought this was the start of a new, better chapter. It wasn’t.&lt;/p&gt;

&lt;p&gt;I managed to keep this new aura of confidence up for a little while. I was managing to come across as far more confident on the surface, but I was still just as depressed inside. I managed to tick off some exceptionally scary checkboxes - I gave some talks at local tech events, real talks, in front of proper crowds. I was asked to give a workshop at the biggest industry conference in the UK for my discipline, I did so. I was asked to write for a magazine, I did. I was voted one of the “top 25 females under 25 in tech”, I responded graciously. All of these seemingly amazing things were happening to me, but to be honest I still felt like jumping off of the nearest bridge.&lt;/p&gt;

&lt;p&gt;I still do now. And now I’ve hit an impasse where I don’t think it will ever end. If this is the way I’m destined to feel for the rest of my life, I’m out. I’m done. I’ve done the prescription medication, I’ve done the therapy, I’ve done the countless amounts of personal effort (talks, magazines, workshops they all took effort, I wanted them to be amazing, I wanted me to be amazing) and I’m barely forward from that fragile 13 year old.&lt;/p&gt;

&lt;p&gt;When I wake up in the morning my first thought is panic - not how beautiful it is outside, or how sweet the birds sound. I immediately run through all of the things I’ve wanted to achieve in my life, weighed up against all of the things I haven’t. I start to panic about all of the things that might go wrong that day. I start running through situations in my head. If I’m heading to the office that day (I work from home 3 days a week) I worry about how much energy it’s going to take me to be around people for 8 hours.&lt;/p&gt;

&lt;p&gt;That last statement sounds so cruel, I know it does. But hear me out. Around others I constantly have to monitor myself.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;I hate my laugh. Be careful laughing out loud at jokes.&lt;/li&gt;
  &lt;li&gt;I know how much of a state / ugly I look. Are other people looking at me? Please don’t look at me…&lt;/li&gt;
  &lt;li&gt;Don’t say anything controversial, people might not like you anymore…&lt;/li&gt;
  &lt;li&gt;Try to appease everyone. But also remember you can’t…&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Being around others for that long is exhausting. At home I can hide. No one can see me, people can rarely hear me (other than meetings) and that’s great. At least, It’s great for my will to hang in here.&lt;/p&gt;

&lt;p&gt;See, I’m at a point now where I’ve tried to battle things head on. Giving a talk in front of a crowd of 70 people was terrifying for me. Honestly, I can’t explain how nervous I was. But I did it. I even received an abundance of positive reactions. Those reactions picked me up and made me feel fantastic for a while, but then it was back down to earth. Back down to reality.&lt;/p&gt;

&lt;p&gt;The reality of it is, I hate myself. I hate everything I am, and most likely everything I will become.&lt;/p&gt;

&lt;p&gt;My mind is a constant battlefield, and it’s exhausting. Absolutely fucking exhausting.&lt;/p&gt;

&lt;p&gt;It’s so hard to explain to others how tiring anxiety and depression are, but they are. They drain me every minute of every day.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;I’ve regularly wanted to pay others a compliment, “nice T-shirt” I want to say, but the room is silent, I don’t have the confidence to break that silence.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I don’t have the confidence to disagree with an opinion head on. I will never lie, or pretend to think something I don’t, but if I don’t know someone well I won’t put up an opposing opinion. It is my belief that that person will hate me immediately. That’s us done.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;If I’m alone I will avoid tills that are manned. It’s just another point of interaction, and failure.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I will avoid using the telephone at absolutely all costs. Can I do it online? If so, I will do it online.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;If there are jokes / conversations being exchanged that are even remotely linked to appearance I will bail out. I know how I look. I know it’s not good. But I won’t even make a statement like “it’s because I’m sexy” as a joke, because I immensely fear the sniggers and subtle facial expressions that others will make upon doing so. This also goes for others making a joke like that n relation to me.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;If I’m walking to the kitchen and I see someone else in there, I’ll walk back and return later. Saves that poor soul dealing with my awkward interaction.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are just a few select things. A few things that I thought outlined how ridiculous and silly a lot of the suffering is. A lot of these seem totally irrational, and that’s another absolutely horrific part of depression. I consider myself a relatively intelligent person, with relatively sane thoughts most of the time, but thoughts linked to depression and anxiety are not rational. You know that the things you’re thinking are insane and highly unlikely outcomes but it doesn’t matter, depression forces you to construe them as very real and very frightening.&lt;/p&gt;

&lt;p&gt;Depression is a black cloud that will follow you and strangle you. It leaves you feeling empty, and facing the outside world is tiring. By far one of the worst symptoms of depression for me is anhedonia, which “is defined as the inability to experience pleasure from activities usually found enjoyable”.&lt;/p&gt;

&lt;p&gt;These are horrible periods where literally nothing I do can give me joy or pleasure. Gaming? Nope. TV? Nope. Food? Nope. You feel numb to everything, nothing is worth it. During these periods I’ll waste the day away (on purpose) by sleeping. It’s at this point that you realise you are, quite literally, wishing your life away. This then starts to hurt more, because you want things to be okay, you want to enjoy life, you don’t want to wish it away - but it’s all you can do, because you don’t know how to be okay or how to enjoy life. A catch 22 that eats away at you.&lt;/p&gt;

&lt;p&gt;This feeling of hopelessness and a lack of enjoyment from life often leads to suicidal feelings. I would be lying if I said I didn’t think about suicide every single day, because I do. I don’t necessarily want to go through with it, but I think about it all the time. Some people may have a random fleeting thought of “that lasagne is going to be great tonight!”, I’ll get a random fleeting thought of “this would all be easier if I were dead”. It’s constantly there in the back of your mind that all of this could be gone with the push of a trigger or the dismount from a bridge. A couple of months ago I actually Googled for “the easiest ways to kill yourself”, and I found enough material to have painlessly and easily ended my life. I always stop myself from making these thoughts a reality - it might be Cam, friends, family or my beautiful pets (a continuation of family) that do it, but it’s still a very real solution kicking around in the back of my mind.&lt;/p&gt;

&lt;p&gt;For some reason as a society we have deemed suicide to be “selfish”. I would argue that suicide is anything but selfish. Those that commit suicide are so out of options, so alone and so at their wits end that the only solution they could think to use was one that could never, ever be reversed. These are not weak, and certainly not selfish people. They are people who have suffered for so long that they’ve taken the permanent route. Robin was not a selfish man for taking his life, and reading otherwise is similarly upsetting.&lt;/p&gt;

&lt;p&gt;To date I have missed so many opportunities because of anxiety and depression. I would love to volunteer at an animal shelter, but it’s never going to happen. Sometimes when Cam is working a Saturday I’d like to go read a book in the park alone, it’s never going to happen. I’d love to strike up a conversation with someone because something of theirs sparked my interest, it’s never going to happen. Granted, ‘never’ is a very strong word. But in my mind these are things that will never happen. There’s a possibility, of course, that they might. The thing is that doesn’t “cure” you. You don’t do a few good acts and overcome depression forever. The shitty little Devil still follows you.&lt;/p&gt;

&lt;p&gt;Personally, as mentioned, I’m at an impasse. And I have no idea which way to head. Lately, I find it impossible to enjoy anything. All of my ‘hobbies’, the things I’m supposed to enjoy, offer me no entertainment. Most of the time I can’t even be bothered to try them. So the next time someone tells you they’re depressed, don’t laugh at them, don’t tell them they have a great life, don’t tell them it’ll get better, don’t tell them to ‘cheer up’ - we know we have good lives, we know we have money, we know we have houses, we know we have partners, we know we have pets; we’re struggling because of a disease, not some temporary factors.&lt;/p&gt;</content><author><name></name></author><summary type="html">This month Robin Williams committed suicide. Robin had battled with addiction and depression all of his life. Understandably, the world mourned his passing - Robin was a great man, after all. The thing that disturbed me was some of the reactions to his death. People flocked to comment sections saying things like “He was famous, with a ton of money, a wife and a house. What did he have to be depressed about?”, these comments made me so, so sad. Actually, they made me angry and then sad. I felt sad because these are the sorts of attitudes that mental health sufferers come up against all the time. Knowing that this massive stigma still exists pains me. I thought I’d take the time to write a bit about my experience with andxiety and depression, if it helps even one person in any way at all then that’s good enough for me. Whilst the tone and overall conclusion of this post isn’t positive, even knowing that other people are “just like me” can make you feel less alone.</summary></entry><entry><title type="html">A career grounded in stumbling</title><link href="/2014/08/05/the-career-of-stumbling.html" rel="alternate" type="text/html" title="A career grounded in stumbling" /><published>2014-08-05T14:41:01+00:00</published><updated>2014-08-05T14:41:01+00:00</updated><id>/2014/08/05/the-career-of-stumbling</id><content type="html" xml:base="/2014/08/05/the-career-of-stumbling.html">&lt;p&gt;Someone asked me recently “how did you learn HTML / CSS?”, I wanted to reply with a fancy answer and a clear, concise route of how I got from A to B - but I couldn’t. Thing is learning HTML / CSS was incredibly muddled for me. I was first introduced to this magical concept of HTML / CSS in University, I had a module on some very basic (now, not then) HTML and CSS. We needed to build ourselves a website, nothing advanced, just a static site. The course quality at my university was horrific, as such we were given little to no guidance on this and the things we were taught were just plain wrong (the kind of worst practices where ‘wrong’ is allowed) or years out of date. This “web stuff” piqued my interest though, I’d always wondered how the hell websites were made, so I figured this was a primary opportunity to learn. I’d have to teach myself, because University were obsessed with using ActionScript 3.0 and Flex to build websites at this point (I only graduated 3 years ago…that’s just how bad it was). Equipped with little more than knowledge of the &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;body&amp;gt;&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/code&gt; elements from an education standpoint I set about learning how the hell this all worked.&lt;/p&gt;

&lt;p&gt;This learning process was messy. In fact it was pretty damn awful. At this point in time I had no idea which resources on the internet were good and which were poor - or worse, suggesting bad practices or even insecure practices.&lt;/p&gt;

&lt;p&gt;I started ‘studying’ websites that I liked. I’d open up the Web Inspector (which was also new to me at the time) and just comb through every bit of HTML / CSS I could. I was pretty obsessed for a while. I wanted to know how these sites were replicating repeatable paper for a background and placing coffee stains in the corner (these were the design trends of the time).&lt;/p&gt;

&lt;p&gt;By poking around in other people’s source code I started to see patterns appear. For example, &lt;code class=&quot;highlighter-rouge&quot;&gt;container&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;col&lt;/code&gt; were very commonly used class names. Why? By Googling this, and stumbling from resource to resource again, I stumbled across the concept of grids and grid systems. At the time the 960 grid system was the Daddy.&lt;/p&gt;

&lt;p&gt;My attention would then shift pretty heavily on to new concept ‘X’ (one day grids, next day accessibility etc). After a while I started to get an understanding of which blogs / websites were good and could be trusted and which couldn’t. At the time CSS Tricks, Smashing Magazine, NetTuts, Spoon Graphics and so on were part of my ‘regular reading’.&lt;/p&gt;

&lt;p&gt;We only had about a week to make our static site for uni. Looking back now it was such a tragic hand in. &lt;code class=&quot;highlighter-rouge&quot;&gt;position: absolute;&lt;/code&gt; ALL THE THINGS seemed to be my mindset at the time. That was okay though. I was enjoying learning this web stuff on my own and teaching myself. I decided that I’d keep on going, and that to be quite honest I’d quite like to be one of these fandangled Web Developers when I leave.&lt;/p&gt;

&lt;p&gt;My self-study kept on going. And it was just as messy and ‘stumbly’ as ever.&lt;/p&gt;

&lt;p&gt;After a few weeks of inspecting sites, reading blogs and playing around with markup I was pretty happy with the ‘static’ side of things. ‘Pretty happy’ does not mean good, I was just aware of most of the core concepts now. I had learned the hard way what the box model was and which order link states were applied.&lt;/p&gt;

&lt;p&gt;I knew that this ‘static’ thing couldn’t get me too far though, after all all the websites I regularly viewed had lots of content, sometimes from multiple authors. There’s no way these people were making one page for every blog article. Turns out, they weren’t. After another Google-party I’d stumbled across the concept of Content Management Systems. Okay, cool. I had the front-end stuff pretty down now; well, the HTML and CSS! But I needed one of these CMS’ to get some data. I fell in to the WordPress hole. There are lots of different communities in the web industry, at this point I was quite firmly in the web agency / use a CMS camp. I started learning all about WordPress, after a month or so I’d built a totally custom theme from scratch and this had custom post loops and clever uses of images etc.&lt;/p&gt;

&lt;p&gt;Hearing how WordPress was a blogging engine and that it wasn’t right for every type of site I started investigating other CMS’. Behold the period of ExpressionEngine! I paid for an ExpressionEngine license and started learning how to use it. I redeveloped my personal blog using it. I also learnt the pure and utter horrors of Drupal and Joomla during this time &lt;em&gt;shudders&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I’d also gained some exposure to web ‘frameworks’ now. By exposure to the ExpressionEngine community I learnt of CodeIgniter. All I knew was ExpressionEngine was built on top of this CodeIgniter thing. But what the hell was CodeIgniter? The website was incredibly confusing given I’d never used / looked at a ‘framework’. The website said it used PHP. My head was now ready to explode. So you have the language PHP, which makes a framework, which then makes a CMS? Right, okay. Of course this makes sense now, but at the time this was genuinely confusing.&lt;/p&gt;

&lt;p&gt;I’d also started brushing up on some JavaScript around now. My fiancé’s best friend (and Head of Digital at the time at an agency) mentioned this thing called jQuery to me. I know this sounds so cute and novel now, but at the time I had literally no concept of these things. I started ‘learning jQuery’ with very little understanding of where JavaScript stopped and jQuery began (an AWFUL way of going about things!).&lt;/p&gt;

&lt;p&gt;Roll on a year and I was hurtling towards graduation. I had a very, very strong grasp of HTML / CSS, a good understanding of JavaScript and I could integrate with multiple CMS’. I was gunning to become a front-end developer at this point. I had absolutely no skills or expertise on the backend (other than using a CMS, which of course, isn’t the same).&lt;/p&gt;

&lt;p&gt;Luckily I landed a roll straight out of university as a front-end developer. This company used Ruby on Rails, another one of these bloomin’ framework things.&lt;/p&gt;

&lt;p&gt;Long story short, I started stumbling through backend development the same way I had with front-end development. What the fuck is MVC? What the fuck is an ORM? What the fuck is a server? How do I configure a server? What the fucking fuck is REST? Now? I’ll happily develop backends using Node.js, PHP or Python, using multiple data stores.&lt;/p&gt;

&lt;p&gt;And the point in this post? Trust me, trust me please, when I say NOBODY KNOWS WHAT THE FUCK THEY’RE DOING. If you’re learning web development now, you’ll be alright. I don’t know when you’ll be alright, but at some point. When you’re done stumbling in to the right things at the right time.&lt;/p&gt;

&lt;p&gt;My journey has gone from CSS to Sass / LESS, from Wamp to Vagrant, from manually running commands to Ansible / Puppet, from no source control to Git, from terrible shared hosting to Digital Ocean, from using CMS’ to building the CMS myself, from jQuery spaghetti to Object-oriented programming, from noob to conference speaker. And could I tell you how exactly to do the same? Nope. I stumbled, I stumbled &lt;strong&gt;a lot&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;API, REST, MVC, SOAP, ORM, Gulp, Grunt, Sass, LESS, Ember, Angular, Backbone, OAuth, Rails, Laravel, Express, Sails, Django, Flask, HTTP, Vagrant, Ansible, Chef, Puppet, Provisioning, Source Control, Git, SVN, Mercurial, sessions, JSON, XML…you’ll need to learn a lot, but &lt;strong&gt;everybody&lt;/strong&gt; did. No one was born with innate knowledge of HTTP status codes. So be nice, don’t laugh at people when they’re clearly learning. And lets definitely help people grow out of any awkward Joomla periods they’re stuck in.&lt;/p&gt;

&lt;p&gt;TL;DR Learnt an awful lot over 3 years, with very little recollection of how I truly got here.&lt;/p&gt;</content><author><name></name></author><summary type="html">Someone asked me recently “how did you learn HTML / CSS?”, I wanted to reply with a fancy answer and a clear, concise route of how I got from A to B - but I couldn’t. Thing is learning HTML / CSS was incredibly muddled for me. I was first introduced to this magical concept of HTML / CSS in University, I had a module on some very basic (now, not then) HTML and CSS. We needed to build ourselves a website, nothing advanced, just a static site. The course quality at my university was horrific, as such we were given little to no guidance on this and the things we were taught were just plain wrong (the kind of worst practices where ‘wrong’ is allowed) or years out of date. This “web stuff” piqued my interest though, I’d always wondered how the hell websites were made, so I figured this was a primary opportunity to learn. I’d have to teach myself, because University were obsessed with using ActionScript 3.0 and Flex to build websites at this point (I only graduated 3 years ago…that’s just how bad it was). Equipped with little more than knowledge of the &amp;lt;body&amp;gt; and &amp;lt;html&amp;gt; elements from an education standpoint I set about learning how the hell this all worked.</summary></entry></feed>