add jquery (broken)
This commit is contained in:
parent
221dbba3be
commit
ebea9faabf
@ -14,5 +14,9 @@ http {
|
|||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /api {
|
||||||
|
proxy_pass http://backend:8000/;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
const apiUrl = 'http://localhost:8000/api';
|
||||||
|
|
||||||
|
function getCatalog() {
|
||||||
|
$.getJSON(apiUrl + "/catalog", function (resp) {
|
||||||
|
document.write(resp.text);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
$( document ).ready(function() {
|
||||||
|
getCatalog();
|
||||||
|
});
|
2
frontend/src/assets/js/jquery-3.7.1.min.js
vendored
Normal file
2
frontend/src/assets/js/jquery-3.7.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -4,11 +4,14 @@
|
|||||||
<title>Single-board Forum</title>
|
<title>Single-board Forum</title>
|
||||||
<link rel="stylesheet" href="assets/css/main.css">
|
<link rel="stylesheet" href="assets/css/main.css">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<script src="assets/js/app.js" type="module"></script>
|
<script src="assets/js/jquery-3.7.1.min.js"></script>
|
||||||
|
<script src="assets/js/app.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>Single-board Forum</h1>
|
<h1>Single-board Forum</h1>
|
||||||
</header>
|
</header>
|
||||||
|
<div class="posts">
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user