Home Deploy a side project on AppHarbor
Post
Cancel

Deploy a side project on AppHarbor

I deployed Shortr to AppHarbor.

ShortUrl is a simple side project I play with in order to try some stuff for future use in another side project.

It’s a simple url shortener project created with NancyFx and MongoDB.

It’s based on ShortURL project by Christian Horsdal following his tutorial Frictionless .NET Web App Development with Nancy with a front-end based on Shortio project by Luis Lopez following his tutorial Let’s build a URL Shortener with Node, MongoDB and Hapi.js.

I had some troubles when I moved from testing the app with ShortUrlDesktopApp project (Nancy.Hosting.Self) to testing the app with ShortUrlWebApp project (Nancy.Hosting.Aspnet).

Trouble with embedded resources from “Content/public” folder in ShortUrl library.

I found the solution here and I solved on local machine testing with Visual Studio.

After committing everything, I discovered that GitHub doesn’t show commits in the contributions graphic grid when made on forked projects.
Because I use this project as a playground for Webmarks project, I’m not interested to create pull requests to original project. So I wanted to detach my project from the original one.
On GitHub site I found that you have to contact GitHub Support.

To detach the fork and turn it into a standalone repository on GitHub, contact GitHub Support.

But I have not pull requests on that repo and only the branch master, so I followed this solution found on StackOverflow:

  • verify that my local repo is in sync with the remote one
  • delete the repo on GitHub
  • create a new repo on GitHub with the same name, this way the origin url is the same
  • execute a force push to the remote repo

Everything was fine.

Then I had to push to the AppHarbor repo from the local repo. But the original project uploaded on AppHarbor was different from the one I’m working on now. So I have to force push to AppHarbor repo, too. This way also the AppHarbor repo is in sync with my local repo.

At this point AppHarbor build my project and deploy it if there are no errors. The build was fine, but the site didn’t work. There was a problem with Nuget packages references to different versions of MongoDB Driver and a missing reference to System.Runtime.InteropServices.RuntimeInformation package in the ShortUrlWebApp project that was not required running it on my local machine (“It works on my machine”). After some “try and error” steps, finally I was able to see my site working.

This post is licensed under CC BY 4.0 by the author.