Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ur-code-buddy/pondyvibes_backend
https://github.com/ur-code-buddy/pondyvibes_backend
apis backend cloudflare hono javascript
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ur-code-buddy/pondyvibes_backend
- Owner: Ur-Code-Buddy
- Created: 2024-08-09T12:45:27.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-29T07:42:55.000Z (5 months ago)
- Last Synced: 2024-10-25T03:44:20.231Z (3 months ago)
- Topics: apis, backend, cloudflare, hono, javascript
- Language: JavaScript
- Homepage: https://pondyvibes.05baivab.workers.dev
- Size: 78.1 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PondyVibes Backend
This is the backend for the PondyVibes application, built using the Hono framework, specifically designed for Cloudflare Workers.
## Overview
This backend provides the following functionalities:
- **CORS Middleware**: Applied globally to allow cross-origin requests.
- **Admin Login**: Verifies admin credentials stored in Cloudflare's KV storage.
- **Content Management**:
- Store content using a `POST` request with admin authentication.
- Retrieve stored content with a `GET` request.
- **Status Check**: Endpoint to check if the server is running.
- **Send Message**: Sends a booking request email with custom HTML formatting via the Resend API.## Endpoints
- `GET /status`: Check server status.
- `GET /`: Base endpoint providing a simple message.
- `POST /store_content`: Stores content with admin authentication.
- `GET /get_content`: Retrieves stored content.
- `GET /login`: Verifies admin credentials.
- `POST /send_message`: Sends a formatted email using the Resend API.## Why Hono?
Hono is used instead of Express due to its lightweight design, making it ideal for Cloudflare Workers. This enables faster response times and better performance on serverless environments.
## Environment Variables
- **USERS_KV**: Cloudflare KV namespace for storing admin credentials.
- **CONTENT_KV**: Cloudflare KV namespace for storing content.
- **Resend API Key**: `re_jhHk6Ar7_DxmMo34uAt1z2avpqbFzx6YJ` used for sending emails via Resend.## Deployment
This backend is designed to be deployed on Cloudflare Workers.
## License
This project is licensed under the MIT License.