Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fxserve

Local static HTTP server for fx projects.

Serves a directory root over HTTP (and optional HTTPS). Product logic is a thin C host (host/serve + optional host/concur workers + Mbed TLS). Not nginx; not Tokio.

Requires fx 0.9.72+ recommended (scaffold web); gcc to rebuild
Platforms Windows + Linux x86_64
License GPL-3.0
Org LedoCorp

Install (release binaries)

  1. Download the asset for your OS from Releases.
  2. Put bin/windows/fxserve.exe or bin/linux/fxserve on your PATH.
fxserve ./examples/site --port 8765
# open http://127.0.0.1:8765/

Usage

fxserve <root-dir> --port <N> [--bind 127.0.0.1] [--once | --requests <K>]
         [--workers <N>] [--max-pending <N>]
         [--cert pem --key pem]

Default bind is 127.0.0.1. workers=0 is single-threaded. workers>0 uses a nursery worker pool + bounded job channel (structured concurrency — not Tokio). TLS (--cert + --key) is single-thread only in v1.

Exit Meaning
0 Clean stop
1 Usage
2 Bind / listen failure
3 Root missing or not a directory
4 Accept / I/O / nursery failure

Scaffold

With fx installed:

fx new mysite web
fxserve ./mysite/site --port 8765

Rebuild (from this pack + fxlang)

Release zips are the supported install path. To rebuild from source you need the fx language package (host/serve, host/concur) and Mbed TLS (see NOTICE). The monorepo tools/fxserve/build.ps1 is the steward build; this pack ships main.c for inspection.

Non-goals (v1)

--app convenience wrap · P2P · webview shell · Tokio / M:N · RPS marketing vs nginx · ambient std listen

Related tools

fxrun · fxfetch · fxlang

Copyright Shawn Londono · LedoCorp · GPL-3.0 — see LICENSE.

About

fxserve - local static HTTP(S) server for fx projects (LedoCorp)

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages