Skip to content

Unable to run IPM on domain path #31

@MClarkDev

Description

@MClarkDev

I setting up my own cluster of nodes and would like to run IPM on a subpath of my domain:

https://dashboards.example.com/node-00-dashboard/

This is currently not possible with the current implementation.

The ask is to all a user-configurable access path., i.e.

node index.js -i http://node00.pool.example.com:14265 -p 127.0.0.1:14400/node-00-dashboard -r 10

This would require something along the lines of

 var port = 8888;
 var host = "127.0.0.1";
+var path = "/";

 if (typeof argv.port === 'string'){
-    var portArgs = argv.port.split(':');
+    var pathArgs = argv.port.split('/');
+    path = pathArgs[1];
+    var portArgs = pathArgs[0].split(':');
     port = portArgs[1];
-    host = portArgs[0];
+    host = portArgs[0];
 }
 else if (argv.port){
     port = argv.port;
 }

-console.log("Serving IOTA peer dashboard at http://"+host+":"+port);
+console.log("Serving IOTA peer dashboard at http://"+host+":"+port+'/'+path);
+
+app.use('/'+path,express.static(__dirname+'/public'));

I have made these change to index.js and conceptually it will work, but will need a lot more work on the interface side to work with dynamic pathing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions