How to use postinstallpage and configurepage modules in descriptor file?

Hai all,
I am in need to create a third party integration with jira. I chose connect app after lot of discussions. Now i need to develop a postinstallpage and configurepage. I read some documents about these. but didn’t get any clarification. I will explain my requirement. If anyone know about it, kindly give your suggestions.

First i will post my code.

In atlassian-connect.json,

"postInstallPage": {
            "url": "/my-post-install-page",
            "name": {
              "value": "My Post-Install Page",
              "i18n": ""
            "key": "my-post-install-page"
        "configurePage": {
            "url": "/my-config-page",
            "name": {
              "value": "My Configure Page"
            "key": "configpage"

I added these lines under modules in atlassian-connect.json

In index.js,

app.get('/my-post-install-page', addon.authenticate(), (req, res) => {
          title: 'Atlassian Connect'
    app.get('/my-config-page', addon.authenticate(), (req, res) => {
          title: 'Atlassian Connect'

In postinstall.hbs file,

<!doctype html>
    <script id="connect-loader" data-options="sizeToParent:true;">
    (function() {
      var getUrlParam = function (param) {
        var codedParam = (new RegExp(param + '=([^&]*)')).exec([1];
        return decodeURIComponent(codedParam);

      var baseUrl = getUrlParam('xdm_e') + getUrlParam('cp');
      var options = document.getElementById('connect-loader').getAttribute('data-options');

      var script = document.createElement("script");
      script.src = baseUrl + '/atlassian-connect/all.js';

      if(options) {
        script.setAttribute('data-options', options);


<h1>An introductory page</h1>

<p>Use this page to show the installer some information on how to use your add-on.</p>

When i run this code in my cloud instance, I got the buttons get started and configure.
Now my doubt is when i click the get started or configure button why it will redirect to a page with url “plugins/servlet/ac/app_name/my-config-page” and send 404 error.

Shall i missed anything to do or did i understand wrongly about the flow of using postinstallpage and configurepage? Please give a clarity in this problem.

Thanks in advance…

Did you figure this out?

That JS block in your postinstall.hbs is old. It was needed when all.js was hosted with the product itself. It has since been moved to a CDN. See here for more on how to include all.js from the CDN.

Also if you found that block of JS in the docs can you share the link so we can update them?