xapi-launch icon indicating copy to clipboard operation
xapi-launch copied to clipboard

How to add base URL for this project?

Open darshit7 opened this issue 7 years ago • 4 comments

Is there any configurations to add base url for this application?

darshit7 avatar Feb 12 '18 11:02 darshit7

Good Morning @darshit7, is this what you were looking for?

//Sets up the wrapper
        var wrapper = ADL.XAPIWrapper;
        wrapper.changeConfig({
            "endpoint": "https://lrs.adlnet.gov/xapi/",
            "auth": "Basic " + toBase64('user:password')
        });

//baseURI is a URL that you can use later to add extensions to your JSON File
wrapper.baseURI = "http://example.com/";

FlorianTolk avatar Feb 12 '18 13:02 FlorianTolk

No. When I run xapi-launch server using command node app, it listen on localhost:3000 but what I want is to make it available on localhost:3000/<base_url>/ All requests should be served on localhost:3000/<base_url>

darshit7 avatar Feb 13 '18 06:02 darshit7

Have you tried just modifying the app.js file to do that redirect logic for you?

vbhayden avatar Feb 13 '18 06:02 vbhayden

Actually, I am new to nodejs and don't know how to write logic for redirect. I would appreciate if you guide me. I have little bit idea about express Router but I don't know from where to start.

darshit7 avatar Feb 13 '18 06:02 darshit7