text: document.addEventListener('DOMContentLoaded', () => {
      const signupForm = document.getElementById("signup-form");
  
      const signupFormHandler = async (event) => {
          event.preventDefault();
      
          const username = document.querySelector('#username-signup').value.trim();
          const email = document.querySelector('#email-signup').value.trim();
          const password = document.querySelector('#password-signup').value.trim();
  
          if (username && email && password) {
              const response = await fetch('/api/users', {
                  method: 'POST',
                  body: JSON.stringify({ username, email, password }),
                  headers: { 'Content-Type': 'application/json' },
              });
              console.log(response);
      
              if (response.ok) {
                  document.location.replace('/');
                  alert("You have successfully Signup.");
              } else {
                  alert('Failed to sign up.');
              }
          }
      };
      
      signupForm.addEventListener('submit', signupFormHandler);
      });