Adam Frieberg
Minister, Computer Programmer, Geographer, Photographer

captures, reflections, sketches of and about images Even though Adam lacks classical training, he tries to pay attention an ordained minister in the Christian Church (Disciples of Christ), Adam serves the church and the world, experimenting with non-traditional models of ministry "didn't I already solve this once?"
the reminders of frontend (JS/TS), backend (C#), database (T-SQL)
issues and how Adam has solved them
August - November 2014
Adam and Heidi go across the U.S. on trains, retreat at monasteries,
and live in Jerusalem and Rome. Attempting to be "guests" for the entirety.
Discovering new ways of looking at humans' relationships with each other and their spaces

I'm very thankful the mark of a good web developer is not their ratio of palms-to-foreheads. In that case, I'd be a phenomenal developer .. but with a headache.

As it is, I'm just mediocre. And I'm definitely a glutton for punishment.

When the Ghost blogging software launched, they had some amazing documentation about how to get it running locally on my machine. They also had several partners, and eventually the non-profit org itself, who were able to setup hosting and scale for users to setup their own blogs without much fuss.

But as I said, I'm a glutton for punishment.

So when Windows Azure^ started offering a Ghost template on their Azure Websites section of the Azure portal, I decided to jump in.

In all, it wasn't too complicated of a process. Scott Hanselman had writtena great tutorial back when Ghost 3.3 was current. Jeremiah Billmann had also done a guiding article back when Ghost was just exposed on GitHub.

There were several steps to the process, with only a few hiccups:
  • Getting my local Visual Studio solution setup to unobtrusively let me edit my NodeJS code without adding lots of VS-specific files to it
    • There are NodeJS tools built for Visual Studio, but they're still in alpha and I'm not comfortable enough with my config skills to get them running locally without any problems. (Tried and backed out of that hole)
  • Getting Ghost deploying via Git pushes GitHub and then to Azure (pretty straightforward)
  • Getting Azure configured for IIS to serve the NodeJS site correctly (needed web.config ... see below)
  • Getting a decent separate local copy installed to debug the theme I put together to dive into the Handlebar errors (should be a way to do this without needing a separate local instance ... but I wasn't that much of a glutton for punishment)
Overall, I'm thrilled I tried it out and it's working great so far.

The hiccup I mentioned in the step list was that I needed to put a web.config file into my main repo for Azure Websites to know what to do with the code. To get this far, I created a clean copy from the Azure Websites (using the Ghost template) and then used Visual Studio Online to go in and see what else I was missing.

This was the web.config (sorry my Ghost theme doesn't preserve formatting that well; use Ctrl-K Ctrl-D in VS for a nicer version):

<?xml version="1.0" encoding="utf-8"?> <configuration>
<system.webServer> <httpErrors existingResponse="PassThrough" /> <handlers> <add name="iisnode" path="index.js" verb="*" modules="iisnode"/> </handlers> <rewrite> <rules> <rule name="StaticContent"> <action type="Rewrite" url="public{REQUEST_URI}"/> </rule> <rule name="DynamicContent"> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/> </conditions> <action type="Rewrite" url="index.js"/> </rule> </rules> </rewrite> </system.webServer> </configuration>

^ = While I'm by no means a Microsoft fanboy or die-hard ... I have been using Visual Studio as my primary IDE for the past year or so. There's A LOT to be said for the underappreciated features of intellisense and lots of the web tech they've built into their One ASP.NET strategy. That's not to say that other IDEs or languages can't do the same (most of them can). I appreciate, however, that Microsoft can enable me to do much of them quicker. I really don't miss my days of PHP development in Sublime Text with sub-optimal (console only) debugging and troubleshooting.