Modifying Atlassian Connect Express Framework

During development of my next cloud app that uses Atlassian’s ACE Framework, I have came to a point where I need to modify ACE Framework code to better suit my needs.

ACE uses Ngrok for tunneling between development machine and Cloud Jira instance. It is hard coded to use a free Ngrok tunnel with following code.

ngrok.connect({ proto: 'http', addr: addon.config.port() });

As you can see it doesn’t accept subdomain parameter which is required to connect a reserved tunnel address. Why I need this is a little complicated and part of another post.

ACE Framework is open-source and available on Bitbucket. I want to convert it to following.

ngrok.connect({ proto: 'http', 
                addr: addon.config.port(), 
                subdomain: addon.config.ngrokSubdomain()
                region: addon.config.ngrokRegion() });

For this to work I also need how config.json is parsed too. Because it doesn’t contain ngrokSubdomain parameter. Underlying NPM package of ngrok has this option.

First I have forked ACE Framework on Bitbucket and cloned it to my development machine. Forking it will allow me to synch updates from original ACE Framework when it is updated. Bitbucket will let me know there are updates to original repository and whether I want to synch or not.

After completing my changes and pushing them to Bitbucket my changes were ready. But I needed to add this new ACE fork to my projects as NPM dependency. Until so far, I had always installed packages from NPM Repository so I needed to check how to install NPM packages from Bitbucket. Fortunately NPM had build-in support for Git Repositories. So I can able to install new ACE fork from my private Bitbucket repository using following command:

npm install -S git+ssh://git@bitbucket.org/denizoguz/atlassian-connect-express.git

It is added to “dependencies” section of “package.json” file as follows:

"atlassian-connect-express": "git+ssh://git@bitbucket.org/denizoguz/atlassian-connect-express.git",

Leave a Reply

Your email address will not be published. Required fields are marked *