Difficulty: Advanced
Estimated Time: 10 minutes

Building Bitbucket Add-ons with Atlassian Connect Express

In this excercise, we'll build simple add-on that gets a count of all your public repositories and displays them on your Bitbucket page

Steps

  1. Setting up your environment for Atlassian Connect
  2. Bootstrapping and configuring your Bitbucket add-on
  3. Registering your add-on
  4. Extending your add-on
  5. Profit

Build Bitbucket add-ons

Step 1 of 4

Getting Started

To get started with Atlassian Connect Express and Atlassian Connect CLI, you need to have a proper NodeJS Environment.

Next you need to install the CLI that allows you to scaffold ACE applications:

npm i -g atlas-connect

Next, we need to create new ACE application

Let's name our project bitbucketapp (very creative). To create the app, we execute the following command:

atlas-connect new bitbucketapp

Select bitbucket as the product you're targetting

Press enter and give it a couple of minutes to scaffold the app.

Enter into the created directory
cd bitbucketapp

Important : For this demo we'll extra stuff namely sqlite adapter and nodemon. We'll use SQLite to persist data and Nodemon to keep our application running after every update

Install them as follows:

npm install --save sqlite

npm install -D nodemon

Next add the following line at the start of the scripts section of package.json file

"dev": "nodemon -r esm app.js",

Finally run

npm install