init
This commit is contained in:
41
README.md
Normal file
41
README.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# VenueAxe Redirect Service
|
||||
|
||||
A lightweight HTTP redirect service written in Go that redirects all incoming traffic to `https://venueaxe.com`.
|
||||
|
||||
## Features
|
||||
- **Direct Redirect**: All incoming requests redirect directly to `https://venueaxe.com` (paths and query parameters are discarded).
|
||||
- **Configurable target**: Set via `TARGET_URL` (defaults to `https://venueaxe.com`).
|
||||
- **Configurable port**: Set via `PORT` (defaults to `8080`).
|
||||
- **Graceful shutdown**: Handles `SIGINT` / `SIGTERM` signals cleanly.
|
||||
- **Zero dependencies**: Standard library only (`net/http`).
|
||||
|
||||
## Configuration
|
||||
|
||||
| Environment Variable | Default Value | Description |
|
||||
|---|---|---|
|
||||
| `PORT` | `8080` | Port the HTTP server listens on |
|
||||
| `TARGET_URL` | `https://venueaxe.com` | Destination URL |
|
||||
|
||||
## Running Locally
|
||||
|
||||
```bash
|
||||
# Run with default settings (port 8080)
|
||||
go run .
|
||||
|
||||
# Run on a custom port
|
||||
$env:PORT="3000"; go run . # PowerShell
|
||||
# or
|
||||
PORT=3000 go run . # Bash
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
|
||||
```bash
|
||||
go test -v ./...
|
||||
```
|
||||
|
||||
## Building Binary
|
||||
|
||||
```bash
|
||||
go build -o redirect-server.exe .
|
||||
```
|
||||
Reference in New Issue
Block a user