Testar render_template() för att få över information till klienter
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Frontend</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
const apiEndpoint = '<%= api_endpoint %>'; // Templating syntax (Jinja2)
|
||||||
|
console.log("API Endpoint:", apiEndpoint);
|
||||||
|
|
||||||
|
// Use apiEndpoint in your frontend code...
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user