Add js conf.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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
7
www/app.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
function helloFromJS() {
|
||||||
|
document.getElementById('app-js').innerHTML = 'Application JS';
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = () => {
|
||||||
|
helloFromJS();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user