wails/v3/examples/file-association
Lea Anthony 9a363d7be5
feat(v3): add server mode for headless HTTP deployment (#4903)
* feat(v3): add server mode for headless HTTP deployment

Server mode allows Wails applications to run as pure HTTP servers
without native GUI dependencies. Enable with `-tags server` build tag.

Features:
- HTTP server with configurable host/port via ServerOptions
- WAILS_SERVER_HOST and WAILS_SERVER_PORT env var overrides
- WebSocket event broadcasting to connected browsers
- Browser clients represented as BrowserWindow (Window interface)
- Health check endpoint at /health
- Graceful shutdown with configurable timeout
- Docker support with Dockerfile.server template and tasks

Build and run:
  wails3 task build:server
  wails3 task run:server
  wails3 task build:docker
  wails3 task run:docker

Documentation at docs/guides/server-build.mdx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(v3): add server mode for headless HTTP deployment

Server mode allows Wails applications to run as pure HTTP servers
without native GUI dependencies. Enable with `-tags server` build tag.

Features:
- HTTP server with configurable host/port via ServerOptions
- WAILS_SERVER_HOST and WAILS_SERVER_PORT env var overrides
- WebSocket event broadcasting to connected browsers
- Browser clients represented as BrowserWindow (Window interface)
- Health check endpoint at /health
- Graceful shutdown with configurable timeout
- Docker support with Dockerfile.server template and tasks

Build and run:
  wails3 task build:server
  wails3 task run:server
  wails3 task build:docker
  wails3 task run:docker

Documentation at docs/guides/server-build.mdx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: address CodeRabbit review comments

- Fix corrupted test file with embedded terminal output
- Fix module name mismatch in gin-routing (was gin-example)
- Fix replace directive version mismatch in gin-service
- Fix placeholder module name in ios example (was changeme)
- Fix Dockerfile COPY path to work from both build contexts
- Fix bare URL in README (MD034 compliance)
- Fix comment accuracy in getScreens (returns error, not empty slice)
- Remove deprecated docker-compose version field
- Add port documentation in Taskfile template

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: address CodeRabbit review comments

- Add note about healthcheck wget not being available in distroless images
- Add !server build constraint to menu_windows.go and menu_darwin.go
- Downgrade window-visibility-test go.mod from 1.25 to 1.24 to match CI

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:33:44 +11:00
..
build fix: correct Windows filename in generate:icons task 2025-04-16 15:22:05 +02:00
frontend [v3] Fix invisible footer for light mode users across default templates (#4056) 2025-02-16 11:57:52 +11:00
.gitignore V3 alpha feature/file association port (#3873) 2024-11-09 08:58:20 +11:00
go.mod feat(v3): add server mode for headless HTTP deployment (#4903) 2026-01-25 14:33:44 +11:00
go.sum feat(v3): add server mode for headless HTTP deployment (#4903) 2026-01-25 14:33:44 +11:00
greetservice.go V3 alpha feature/file association port (#3873) 2024-11-09 08:58:20 +11:00
Inter Font License.txt V3 alpha feature/file association port (#3873) 2024-11-09 08:58:20 +11:00
main.go docs: Update dialogs documentation to match actual v3 API (#4793) 2025-12-16 06:05:40 +11:00
README.md Event cancellation for standard listeners. 2025-01-27 09:29:22 +11:00
Taskfile.yml Add darwin universal build and package (#3902) 2024-11-23 23:15:10 +11:00
test.wails V3 alpha feature/file association port (#3873) 2024-11-09 08:58:20 +11:00

File Association Sample Project

This sample project demonstrates how to associate a file type with an application. More info at: https://v3.wails.io/learn/guides/file-associations/

To run the sample, follow these steps:

  1. Run wails3 package to generate the package.
  2. On Windows, run the installer that was built in the bin directory.
  3. Double-click on the test.wails file to open it with the application.
  4. On macOS, double-click on the test.wails file and select the built application.