How To: Use a Custom URL for Your Bungee-powered Apps

If you don’t feel like reading the whole post, here’s the short bullet version:

  • Setup a CNAME entry at your domain provider that points your custom domain prefix to: run.bungeeconnect.com
  • In the ‘Application URL’ field on the ‘Deployment Settings’ section of the ‘Staging’ tab, enter the custom URL to which you want your Bungee app pointed
  • Click the ‘Update’ button to apply the change · It’s that easy!

The Details

At the end of the Hello Bungee Connect Tutorial you deploy, live to the web, a simple Bungee application. It’s a pretty simple tutorial, that builds a pretty simple application; and that last step may seem trivial, but a lot has happened behind the scenes that is very powerful. If you consider the amount of work that typically needs to happen to take a web application from ‘code complete’, through to live deployment, then it isn’t difficult to see why Bungee Connect is unique in its ability to reduce that entire process to just a couple clicks on the Staging tab.

I don’t want to spend too much time talking about either the Staging tab itself or the deploy process. I’ll save that for your own experimentation, the documentation, and perhaps a future post or two. This post is specifically about the ability to change an existing deployment to use a custom URL.

The Staging Tab

The Staging Tab

I’m assuming for this post that you’ve deployed at least one application. If you haven’t and you really want to see an application you’ve built deployed to a custom URL, visit the tutorial at the beginning of this post. It will only take you about 10-15 minutes to get an application up and running and deployed to the world. (pretty cool if you ask me, but nobody ever does) The Staging tab has four main areas. We’re going to spend our time in the bottom panel where you can manage individual deployments. To get to a specific deployment you need to expand a design group in the Production panel until you get to a Solution containing an application that’s been Posted and Deployed.

Deployments View

Once you’ve selected a posted application, you should see its deployment(s) in the far right panel called, as you might guess, “Deployments.”

Selected Post

Select one. The bottom of the page swaps out to show the details for that deployment. (I’ve already expanded the Deployment Settings section in this screenshot)

Managing a Deployment

OK, so here’s where we get to the interesting part. On this page we’re only going to look at the Application URL field, you may have to scroll down to see it, it’s at the bottom . . . this is where you can enter your own URL for your application, such as “mybungeeapp.mydomain.com” or whatever; you get the idea. But, wait . . . you’re probably saying to yourself: “It can’t be that simple, it can’t work if all I do is change that text to whatever URL I want.” You’re right to be saying that, and if you’re not saying that to yourself, you should repeat the sentence above, just so you can be “right” with everybody else.

Creating a CNAME Entry

A couple things need to happen outside of Bungee Connect in order to make this possible. First, you must control (or have administrative access to) the domain to which you want to point your Bungee app. Second you must create a CNAME entry for the domain prefix you want to point at your Bungee app. That’s probably the most foreign part for some Bungee developers so I’m going to walk you through the steps I take to change a CNAME entry at my domain provider. Every domain provider’s user interface is different so this is just for example purposes. Take a look at the screenshot below:

Updating a CNAME 1 of 2

This is a screenshot from my own domain provider. I’ve got two fields to fill out. The first is the Alias Name. That’s the domain prefix I want to point at my Bungee App. A domain prefix is the text just before the domain name in a URL. You’re most familiar with www as a domain prefix. For example: www.bungeeconnect.com. Domain name owners and administrators can setup a different domain prefix like docs.bungeeconnect.com that will go to a different site, which in this case happens to be our documentation. For this example I’m going to use myapp as the domain prefix. The second field is the hostname to which you want to point your CNAME. The hostname to use is: run.bungeeconnect.com. See below:

Updating a CNAME 2 of 2

New CNAMEs typically take effect in a matter of just a few minutes. It depends on your domain provider. Changes to existing CNAMES usually take 24-48 hours to fully take effect, again depending on your domain provider. Either way, once the CNAME is live, you can test that everything is working correctly by entering the new URL in your browser and confirming that you get a response from Bungee. You’ll get one of two results: If you’ve already set the custom URL for your deployment in the Staging tab, you’ll get your running application. If you haven’t yet setup the custom URL for your deployment, then you’ll get the default Bungee “app not found” page. If you get anything else, then there’s a problem. Most likely the CNAME isn’t live yet in on the Internet, or there’s a typo somewhere. Double check your CNAME entries and give it some time to propagate.

Despite the length of this post, deploying a Bungee App to a custom URL is really very simple, yet powerful. You can deploy the same post several times, each one to its own custom URL. Give it a shot, it’s fun to see an application up and running quickly and customized. You can see a simple Bungee App that I deployed to a custom URL a few months ago at: http://flickr.brooksby.com.

I hope you can quickly take advantage of this great feature in Bungee Connect.

Thanks!

Dave Brooksby
Product Manager
Bungee Labs

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: