How to create a bitbucket addon from an existing CLI app developed in type script?

I have the latest bitbucket server trial installed on my machine. I have an application developed in typescript which works from command line and uses Node.js runtime. Now i would like to have this app as an addon in bitbucket. the addon tutorial states that all addons are standalone webapps, but mine is not a web app. My use case is similar to “SVN Mirror for Bitbucket Server” addon. In my case, it is not SVN but a different repository type. could you point me to some tutorials/examples to start developing this kind of addon.

There are two types of add-ons:

  1. Add-ons developed on the JAVA Plugin2 Framework. These add-ons are deployed as JAR or OBR files and are installed directly within the application. These add-ons are typically written in java and use html, javascript, and css resources. They are packaged using the maven and the atlassian sdk.
  2. Add-ons developed against the Atlassian Connect Framework. These add-ons are standalone services that interact with applications over REST APIs and the Connect Framework.

You’ll notice that all the links on the page have Server or Cloud in their name. These correspond to the different API in use.