Friday, April 28, 2017

Express, React on Elastic Beanstalk - Tutorial

In this tutorial I am going to show you how to build a secure website using:
  • AWS Elastic Beanstalk 
    With Elastic Beanstalk, you can quickly deploy and manage applications in the AWS Cloud without worrying about the infrastructure that runs those applications.
     
  • React 
    A JavaScript library for building user interfaces.
  • Express 
    Fast, un-opinionated, minimalist web framework for Node.js.
AWS Elastic Beanstalk uses an AWS EC2 service which is not free. A very basic EC2 instance type t1.micro that includes 600MB disk space and 1 core CPU will cost you around ~16 AUD a month. A domain name from Amazon will cost you  ~16 AUD a year. We are looking at spending a little over 200 AUD a year just to keep this very basic website up and running.

The minimum strength instance type is t2.nano which costs 0.008 $

In return you will have a highly available secure website. Amazon will autoscale your application using a nginx load balancer, so your app will always be available regardless of load. The load balancer will also funnel through https requests into your web server.

Saturday, April 22, 2017

AWS elastic beanstalk, Node.js, Aurelia and ESNext

Long story short, I decided to write a web based password management app using the AWS elastic beanstalk stack. The motivation came from:

  • I  withdrew MiniBluebox, a simple password manager app I wrote, from the Apple App Store in 2016. Since then it became increasingly difficult to keep up with changes Apple introduced on their iCloud/IOS/OSX ecosystem. On some new iPhone models, iCloud synchronisation started to play up and fail. There are also rumours that in late 2017 Apple will drop support for 32-bit apps. Hence MiniBluebox app will simply disappear from all IOS devices with its data. I need a more reliable infrastructure to serve my apps. 
  • I would like to move away from Apple ecosystem and develop cloud based, service oriented web apps using Open Source technologies. This has many advantages:
    • Open source is cheaper
    • Open source is incredibly dynamic and fertile
    • Brand agnostic (web apps work on all platforms, desktop or mobile
    • Service oriented apps are extensible
  • Leverage my existing AWS knowledge I have been acquiring for over a year.
  • Learn about new technologies such as AWS elastic beanstalk, React.JS, and ESNext.
In this blog I will be writing more about my findings as I go along. Stay tuned.

iTerm2 - How to auto-close sessions and auto-exit when last one closed

 Problem There are two problems when you close sessions and windows in ITerm2. When you gracefully exit from ITerm2 sessions with a recommen...