Add js conf.

This commit is contained in:
Florian THIERRY
2022-05-22 13:00:28 +02:00
parent 56916a7970
commit 5945d1d2f4
3 changed files with 10 additions and 2 deletions

View File

@@ -23,8 +23,6 @@ http {
listen 80; listen 80;
server_name my.app; server_name my.app;
root /app;
location / { location / {
root /usr/share/nginx/html; root /usr/share/nginx/html;
try_files $uri $uri/ =404; try_files $uri $uri/ =404;

View File

@@ -5,5 +5,8 @@
</head> </head>
<body> <body>
<h1>Application HTML</h1> <h1>Application HTML</h1>
<div id="app-js"></div>
<script type="text/javascript" src="./app.js"></script>
</body> </body>
</html> </html>

7
www/app.js Normal file
View File

@@ -0,0 +1,7 @@
function helloFromJS() {
document.getElementById('app-js').innerHTML = 'Application JS';
}
window.onload = () => {
helloFromJS();
}