Create index.html
Browse files123456789101112131415161718192021222324252627<!DOCTYPE html><html><body>
<input id="msg" placeholder="Ask something"><button onclick="send()">Send</button><p id="reply"></p>
<script>async function send() { const msg = document.getElementById("msg").value;
const res = await fetch("/chat", { method: "POST", headers: {"Content-Type": "application/json"}, body: JSON.stringify({message: msg}) });
const data = await res.json(); document.getElementById("reply").innerText = data.reply;}</script>
</script>
</body></html>index.htmlAdded+27