Skip to content

Commit

Permalink
display contents of demo file
Browse files Browse the repository at this point in the history
  • Loading branch information
jbergfeld committed Sep 29, 2024
1 parent 7cf91a3 commit 1c3ce6f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var database = dbconnection;
var applicationVersion = JSON.parse(fs.readFileSync('package.json', 'utf8')).version;
var containerImage = process.env.CONTAINER_IMAGE || 'paulbouwer/hello-kubernetes:' + applicationVersion
var containerImageArch = JSON.parse(fs.readFileSync('info.json', 'utf8')).containerImageArch;
var wizfilecontents = JSON.parse(fs.readFileSync('wizexercise.txt', 'utf8')).contents;

logger.debug();
logger.debug('Configuration');
Expand Down Expand Up @@ -76,6 +77,7 @@ app.get(handlerPathPrefix + '/', function (req, res) {
database: database,
container: containerImage + ' (' + containerImageArch + ')',
data: databaseresults,
wizfile: wizfilecontents,
renderPathPrefix: renderPathPrefix
});
});
Expand Down
4 changes: 4 additions & 0 deletions src/app/views/home.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<th>data:</th>
<td>{{ data }}</td>
</tr>
<tr>
<th>wizexercise.txt:</th>
<td>{{ wizfile }}</td>
</tr>
</table>
</div>
<div id="footer">
Expand Down
3 changes: 3 additions & 0 deletions src/app/wizexercise.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"contents": "rosebud"
}

0 comments on commit 1c3ce6f

Please sign in to comment.