Beacon

A lightweight Go web server with customizable configuration

View on GitHub Fork
87
Stars
24
Forks
3
Contributors
MIT
License

About Beacon

Beacon is a lightweight web server built with Go, designed for simplicity and ease of use. It serves static files and provides a straightforward way to configure your web application through a simple JSON configuration file.

With Beacon, you can quickly set up a local development server or deploy a production-ready static site with minimal configuration. The server is efficient, fast, and perfect for hosting personal projects, documentation, or small web applications.

Tech Stack

Go HTML CSS JavaScript JSON

Key Features

  • Lightning Fast: Built with Go for high performance
  • Simple Configuration: Easy setup with config.json
  • Static File Serving: Perfect for static websites
  • Customizable: Adjust port, host, and metadata
  • Cross-Platform: Runs anywhere Go compiles
  • Easy to Use: Simple commands to build and run

Installation & Setup

1 Install Go

Make sure you have Go installed on your system

# Check if Go is installed
go version
2 Clone the Repository

Clone the Beacon repository to your local machine

git clone https://github.com/Skullmc1/Beacon.git
cd Beacon
3 Configure Your Application

Edit the config/config.json file:

{
  "server": {
    "port": 8080,
    "host": "localhost"
  },
  "metadata": {
    "title": "Your Site Title",
    "description": "Your site description",
    "favicon": "/static/favicon.ico"
  }
}

Running the Server

4 Start the Server

Run the server with the following command:

go run main.go
5 Access Your Site

Visit your server in a web browser:

http://localhost:8080
6 Build for Production

Create an executable binary:

# Build for current platform
go build -o beacon main.go

# Run the built binary
./beacon