Every now and then when a technical person tries Recipe Folder out, I get asked about how the application was built and what it runs on. It is kind of an interesting application in that it has quite a few moving pieces. It has a website, a backend api, a Bookmerklet or Browser extension as well as a mobile application that accesses API services on the backend. It is also kind of interesting as it was a chance for a greenfield application where I could choose any technology, and it was built knowing that it was a pretty niche market and not going to have a ton of traffic and really never be able to make money (the dream is that one day it pays for its own hosting). I built the app for myself as something I wanted, and I knew it was always going to be something that a couple of hours a week was spent on and I would never have the time or inclination to work on it full time. I also built it to spend some time with technologies that I was unfamiliar with, and learn about them in a no-risk environment.
So, I chose to write the backend and website in Node.js, using Express with MongoDB being the data store. The app was started before Angular came into vogue, so it was not built with Angular, though one my Trello board there is a task to spend a few hours rewrite the mess that is the Admin interface in Angular 2 to see how that differs from Angular, or I may go with React or Aurelia to try something new. Express has been a joy to use to quickly bang out a website and backend API, especially when used with Mongo and Mongoose. I used MongoLab to host Mongo, for a few reasons: initially I was running the whole backend off of a $3 a month Nodejitsu (more on that later) as I wanted to see what running on a PAAS was like.
I switched off Nodejitsu (no link because they are owned by GoDaddy now, and I refuse to link to anything about GoDaddy) because they increased their prices from $3 a month to $9 and then went through a series of failures where the website would go down for days a time. They also had no way to have a TLS site that used your domain name (you got a nodejitsu.com domain, which was ok for web services, but hardly an optimal situation. I switched from Nodejitsu to a VPS on Digital Ocean, which I have been very happy with. While I do miss the old deployment method of Nodejitsu, though I haven’t missed it enough to switch to Capistrano, or Ship-It or FlightPlan. Currently my deployment method is a collection of custom grunt tasks, but I am thinking of switching to FlightPlan at some point.
Since I was going with a PAAS for the website, I was forced to run on MongoLab a Database as a Service. Running on MongoLab also freed me from the concerns I had heard about MongoDB databases randomly losing all my data, as MongoLab would be in charge of that (though I did still download a backup of my database once a day through a cron script). Eventually I switched from MongoLab to a local Mongo database, as the delay over the wire was causing 100-200 milliseconds and because I started NodeJitsu (and NodeJitsu was running on Joyent) and MongoLab discontinued support for running on the Joyent cloud meaning I was going to have to migrate my database anyway, why not migrate it to a local Mongo database. Mongodb has been running happily on the same DigitalOcean droplet since May, and I have had no problems with it (though I still back it up with a cron task daily just in case MongoDB goes poof).
The original mobile application was written using jQueryMobile, almost three years ago. While I would never recommend using jQuery Mobile now, it served its purpose. A year and a half ago I updated to my own Topcoat-Touch framework, and that improved performance remarkably. I chose to write the app in PhoneGap with web technologies as I was a true believer in hybrid apps, back three years ago when I wrote it I felt that hybrid applications looked and felt almost as good as native applications (the exception was the listview in jQueryMobile, but the re-write fixed that). Over the past couple of months (this is a total part time project, that I spend a couple of hours a week on) I have been rewriting the app for Android Natively, but that’s a different post (to paraphrase Alton Brown).
The app runs on both IOS and Android and has about a thousand active users. The Digital Ocean droplet costs $5 a month (and is shared with a Wordpress (yikes) site, and a couple of light PHP sites for my wife’s business). I spend another $15 a year on the domain (I use Hover and recommend their service). The SSL is free from StartSsl.com, though I will hopefully switch to Let’s Encrypt in the near future. The single biggest expense is the $99 a year to maintain membership to the Apple Developer program (the $25 on-time fee from the Google play store seems like such a good deal now after spending over $400 on Apple for the past few years). On the revenue side, I have made $5 from sales of the Deluxe version of the app over the past 3 years, and have never served enough ads in a year to actually get paid out by AdMob (I mostly integrated AdMob to see how to do it, and I will probably pull it when I release the native version of the app).
So that is it, how I spend about $200 a year on running an app and website that makes no money but keeps me entertained (and I actually find useful).