· Nov 28, 2018

How can I have HealthShare respect relative paths for javascript and css files that are referenced in the index.html file?

I am new to InterSystems.

I have set up a simple application in HealthShare.

Name: /testwebapp
CSP Files Physical Path: /Users/lakinducker/Documents/Dev/testwebapp/dist/testwebapp

In that directory are the following:

If I go to http://localhost:57772/testwebapp, I get "Not found".

If I go to http://localhost:57772/testwebapp/index.html, I get the index.html file. However, it fails to get any of the javascript or css files that are referenced in the index.html.

In fact, I can see that it is trying to get them at..

and not at...

I am confused by this. There probably is a creative way to get around this. However, this is so strange to me, being someone new to InterSystems, that I thought I should ask.

Why is this happening? What do I need to change?

Discussion (9)1
Log in or sign up to continue

If I go to http://localhost:57772/testwebapp, I get "Not found".

Yes, this is expected. The private instance of Apache which HealthShare runs on your port 57772 isn't set up to serve 'default' page(s).

As for your relative path problem, please show us what your index.html file looks like. Simplify it if you wish, but make sure you don't fix the problem as you do so!

<!doctype html>
<html lang="en">
    <meta charset="utf-8">
    <base href="/">

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="favicon.ico">
    <link rel="stylesheet" href="styles.3bb2a9d4949b7dc120a9.css">

<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.c6871e56cb80756a5498.js"></script><script type="text/javascript" src="main.4ba7035983a7e3311083.js"></script>