Echo Form Application

A simple web application that demonstrates form submission and server response echoing.

Features

  • Frontend form with textarea input
  • Real-time form submission via JavaScript
  • Backend API that echoes submitted text
  • Clean, responsive UI with Tailwind CSS
  • Error handling and loading states

Structure

├── backend/
│   └── index.ts          # Hono server with API endpoints
├── frontend/
│   └── index.html        # Main HTML page with form
└── README.md

How it works

  1. User enters text in the textarea
  2. Form submits via JavaScript to /api/echo endpoint
  3. Backend receives the text and echoes it back with metadata
  4. Frontend displays the server response next to the form

API Endpoints

  • GET / - Serves the main HTML page
  • POST /api/echo - Accepts JSON with text field, returns echoed response

Usage

The application is accessible via the HTTP trigger on the backend. Simply visit the URL and use the form to submit text and see it echoed back.