https://github.com/sanwebinfo/deno-webhook-server
Deno Webhook Server is a real-time server application built using Deno. It supports WebSocket connections for real-time updates it includes endpoints for triggering reloads and retrieving messages.
https://github.com/sanwebinfo/deno-webhook-server
api bulma deno deno-server html javascript typscript webhook webhook-server websocket websocket-server
Last synced: 2 months ago
JSON representation
Deno Webhook Server is a real-time server application built using Deno. It supports WebSocket connections for real-time updates it includes endpoints for triggering reloads and retrieving messages.
- Host: GitHub
- URL: https://github.com/sanwebinfo/deno-webhook-server
- Owner: sanwebinfo
- License: mit
- Created: 2024-07-04T14:17:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-27T09:20:04.000Z (2 months ago)
- Last Synced: 2025-07-27T11:28:08.470Z (2 months ago)
- Topics: api, bulma, deno, deno-server, html, javascript, typscript, webhook, webhook-server, websocket, websocket-server
- Language: HTML
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno Webhook Server
Deno Webhook Server is a real-time server application built using Deno. It supports WebSocket connections for real-time updates it includes endpoints for triggering reloads and retrieving messages.
## Features
- **WebSocket Support**: Real-time communication with clients.
- **Message Handling**: send and receive messages with validation.
- **Reload Trigger**: Notifies all connected clients to reload.## Prerequisites
- **Deno**: Ensure you have Deno installed. You can install it following the [official guide](https://deno.land/#installation).
## Setup
- clone the repository or Download
```sh
git clone https://github.com/sanwebinfo/deno-webhook-server.git
cd deno-webhook-server
```- Install Dependencies
```sh
deno cache server.ts
```- Start the server using the following command
```sh
deno run --allow-net --allow-env --allow-read --allow-write server.ts
or
deno task start
```
## API Endpoints
### WebSocket Endpoint
URL: `/ws`
Method: WebSocket Upgrade
Description: Establish a WebSocket connection to receive real-time updates and message.### Send Message Endpoint
- URL: `/send-message`
- Method: POST
- Description: Sends a message to all connected WebSocket clients.
- Request Body:```json
{
"message": "Your message here"
}
```## Example curl Commands
```sh
## Send Message
curl -X POST http://localhost:8000/send-message \
-H "Content-Type: application/json" \
-d '{"message": "Hello, WebSocket!"}'
``````sh
# Retrieve all stored messages
curl -X GET http://localhost:8000/messages```
## Static Page
- open `http://localhost:8000` on Browser and check the WebSocket Activities
## Hosting
- Deno Deploy:
## LICENSE
MIT