Skip to content

Commit

Permalink
refactor(#35): custom script after variable defs
Browse files Browse the repository at this point in the history
provides option to use PATH/PORT
  • Loading branch information
jannis-baum committed Jul 18, 2024
1 parent fb889b3 commit 1009778
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ router.get(/.*/, async (req: Request, res: Response) => {
${body}
</div>
</body>
${config.scripts ? `<script type="text/javascript">${config.scripts}</script>` : ''}
<script>
window.VIV_PORT = "${config.port}";
window.VIV_PATH = "${absPath(req.path)}";
</script>
${config.scripts ? `<script type="text/javascript">${config.scripts}</script>` : ''}
<script type="text/javascript" src="/static/client.js"></script>
</html>
`);
Expand Down

0 comments on commit 1009778

Please sign in to comment.