Skip to content

Commit

Permalink
Adding a homepage property to the package.json which allows the asset…
Browse files Browse the repository at this point in the history
…s to be mounted under a sub director
  • Loading branch information
marc-costello committed Mar 14, 2017
1 parent 1617f06 commit d6aba4b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions globalConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ module.exports = {
* Dictates the path in which the whole application (client & server) is mounted.
* e.g. http://ecs-monitor/{MOUNTING_PATH}/services
*
* You also need to set the 'homepage' property in the package.json to match this value.
* Ensure to include a trailing slash /
*
*/
MOUNTING_PATH: '/'
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "tombola.ecs-cloudwatch-monitor",
"version": "0.1.0",
"private": true,
"homepage": "/",
"devDependencies": {
"react-scripts": "0.9.0"
},
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js"></script>

<title>Tombola ECS Cloudwatch</title>
<title>ECS Monitor</title>
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 1 addition & 2 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ const sts = new AWS.STS({
secretAccessKey: AWS_SECRET_ACCESS_KEY
});

app.use(express.static(rootPath));

sub.use(express.static(rootPath));

sub.post('/authenticate', (req, res) => {
return sts.getSessionToken().promise().then(res.json.bind(res));
Expand Down

0 comments on commit d6aba4b

Please sign in to comment.