Zero to MVP in 8 hours using Meteor
Published on July 27, 2016 by Kieren
Posted in Technology
I’ve long been a (possibly poor) follower of Stephen Covey’s 7 Habits of Highly Effective People method (stephencovey.com), which is well known in Management methodology, and I wanted to build a simple web app where I could manage my attempts to balance my life according to the method.
Red River build large ERP web apps for encapsulating the entire business process using cutting edge technologies, usually C# WebAPI on Azure with MongoDb/Redis or SQLserver according to business requirement on the backend, and usually AngularJS as a Single Page Application on the front end. This proves highly effective for giving corporate advantage to our clients.
However, for my little web app I wanted to use something very fast to put together, and also learn some new technology. Colleagues suggested that I try Meteor. We use Node and Mongo for some products, so I am already familiar with these, however, you hardly have to know anything about them to use Meteor. Within 4 hours I’d followed the ToDo tutorial, and using it to inform building my site, then adding the Login buttons and subsequently Google and Facebook login buttons.
The DevOps took 4 hours. First I purchased an Ubuntu Droplet at Digital Oceans and hosted there in a primitive fashion. This worked, but took a while to install, so I thought, for the purposes of my super-quick Thought-to-Working site process, it was a no-goer. It’s nice to know you can just move your app so easily to a Linux instance.
So instead I published to Meteor Galaxy, which is hosted on Amazon Web Services. I then purchased a mongo Db instance at mLab, and connected my Galaxy Container to the mLab mongo instance (also hosted on AWS). This worked excellently, and you can scale up the Mongo instance to a high Availability cluster very easily, add automatic backups etc. Very nice indeed.
It’s also fairly easy with Galaxy to publish separate branches so you can have a Dev and Live site very easily. Adding SSL to the galaxy site is really as easy as pressing a button (Add SSL). Awesome.
Note: for low volume Galaxy is free, and mLab single instance is free.
One of the hardest parts of the whole process was making a settings file for the Meteor deployment to Galaxy, and then also configuring Google login to work with the site (from the Google Cloud console – it’s easy from Meteor itself). Notes below.
Of course I also had to buy the domain and then point it at the website. I used GoDaddy for that. (less than £1 for the first year).
There is the ability to make an Android app or iPhone app directly from Meteor as well, again very cool indeed. At the moment, I’m using the website on my iPhone. I actually find responsive templates like Bootstrap great, but on the iPhone, they are too small and being reactive, you can’t use the iPhone’s regular webpage zoom!
For styling I just threw in a bit of inline CSS and a graphic. Below is how it looks on my iPhone – both Login and actual screen.
My working Meteor settings.json file – note how the mongo Db is being pointed to mLab. Also note, my app is hosted in Eu-west site of Galaxy, however, despite this, use the galaxy.meteor.com address.
Google credentials setup – note authorised redirects that Meteor uses: