Unleash your inner surf warrior

Experience the thrill of conquering the waves with Amas surfboards, crafted with precision and passion for the ocean.

Sales

Last Chance – Sweater Sale

Handpicked For You

async function sendMessage() { const userInput = document.getElementById('userInput').value; const chatResponseDiv = document.getElementById('chatResponse'); if (!userInput) { chatResponseDiv.innerHTML = "

Please enter a message.

"; return; } chatResponseDiv.innerHTML = "

Sending...

"; try { const response = await fetch('http://44.222.167.138:5000/chat', { // Replace with your ECS public IP method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message: userInput }) }); if (response.ok) { const data = await response.json(); chatResponseDiv.innerHTML = `

Bot: ${data.message}

`; } else { chatResponseDiv.innerHTML = "

Error communicating with chatbot.

"; } } catch (error) { console.error('Error:', error); chatResponseDiv.innerHTML = "

Unable to reach chatbot server.

"; } }