This is a simple web app built with the Fiber web framework and the GORM ORM that collects user emails and client information (IP address and user agent) and stores it in a SQLite database.
Visit http://localhost:8080 in your web browser to see the app in action.
π API Endpoints
The app has a single endpoint that collects user emails and client information and returns a JSON response:
POST /subscribe
Collects the user's email address and any additional data provided in the request body, as well as the client IP address information and user agent. Stores this information in the SQLite database and returns a JSON response containing a message.
Request Body:
{
"email": "user@example.com",
"data": "additional data to log"
}
Response Body:
{
"message": "your message goes here"
}
π Dependencies
The app uses the following third-party dependencies: