A starter template for building web applications with Ziex deployed on Railway.
1. Install ZX CLI
# Linux/macOS
curl -fsSL https://ziex.dev/install | bash
# Windows
powershell -c "irm ziex.dev/install.ps1 | iex"2. Install Zig
brew install zig # macOS
winget install -e --id zig.zig # Windows├── app/
│ ├── assets/ # Static assets (CSS, images, etc)
│ ├── main.zig # Zig entrypoint
│ ├── pages/ # Pages (Zig/ZX)
│ │ ├── layout.zx # Root layout
│ │ ├── page.zx # Home page
│ │ ├── client.zx # Client-side component
│ │ └── ...
│ └── public/ # Public static files (favicon, etc)
├── build.zig # Zig build script
└── build.zig.zon # Zig package manager config
zig build devApp will be available at http://localhost:3000 with hot reload enabled.
- Push this repo to GitHub
- Go to Railway and create a new project
- Select Deploy from GitHub repo
- In your service settings, configure:
- Build Command:
zig build -Doptimize=ReleaseSafe && zig build zx -- bundle - Start Command:
./bundle/ziex_app --rootdir ./bundle/static
- Build Command:
The app listens on port 3000 by default. In your Railway service settings, set the Internal Port to 3000.
To use a custom port, add -Dport=8080 to the build command and update the start command accordingly.
Contributions are welcome! For feature requests, bug reports, or questions, see the Ziex Repo.