Skip to content

A basic HTTP static file server - intended to eventually be folded into a wider "radix" tool

License

Notifications You must be signed in to change notification settings

osuritz/radix-serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

radix-serve

A basic HTTP static file server - intended to eventually be folded into a wider "radix" tool

Configuration file

Radix will search for a configuration file named .radix.yml in the working directory and recursively look up for this file until it reaches the root.

The config file supports named sections which allow you to define multiple locations and start the server with the configuration that you want. The port is always optional and, if left out, will default to Radix's default serving port (:8080).

# .radix.yml
site1:
  path: /var/www/site1
  port: 8888

site2:
  path: /var/www/site2
  port: 8000

foo:
  path: /var/www/site3

Metrics

Radix-serve includes a built-in metrics endpoint that displays live request statistics for all running applications. By default, the metrics server runs on port 8739 and is automatically started unless disabled with the --no-metrics flag.

Viewing Metrics

When radix-serve is running, visit http://127.0.0.1:8739/ in your browser to see a live dashboard showing:

  • Method: HTTP verb (GET, POST, etc.)
  • Path: Requested URL path
  • Status Code: HTTP response status (color-coded: green for 2xx, yellow for 4xx, red for 5xx)
  • Response Size: Size of the response in bytes
  • Timestamp: When the request was made

The dashboard displays the last 1000 requests for each application, grouped by application name.

Command-Line Options

  • --metrics-port <port>: Customize the metrics server port (default: 8739)
  • --no-metrics: Disable the metrics endpoint entirely

Examples

# Start with default metrics on port 8739
radix-serve --port 8080

# Start with metrics on a custom port
radix-serve --port 8080 --metrics-port 9000

# Start without metrics
radix-serve --port 8080 --no-metrics

# Start a named configuration with metrics
radix-serve --name site1

About

A basic HTTP static file server - intended to eventually be folded into a wider "radix" tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages