Skip to content

ziex-dev/template-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ziex App with Node Package Managers

This is a starter template for building web applications with Ziex, a full-stack web framework for Zig.

This project can be used without having to installe Zig or Ziex globally, it works with any Node package manager (npm, yarn, pnpm, bun, etc).

Documentation →

Getting Started

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

Other platforms →

Project

├── 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 counter component
│   │   └── ...
│   └── public/         # Public static files (favicon, etc)
├── build.zig           # Zig build script
├── build.zig.zon       # Zig package manager config
└── README.md           # Project info

Usage

Development

bun dev

App will be available at http://localhost:3000. with hot reload enabled.

Serve Production Build

bun serve

Exporting as Static Site

bun export

This will create a dist/ directory with the static export of your app. You can deploy the contents of dist/ to any static hosting provider (Netlify, Vercel, GitHub Pages, etc) or serve it with any static file server.

Deployment

bun bundle

This will create a bundle/ directory with the binary and static assets needed to run your app. You can deploy the contents of bundle/ to any VPS.

ZX CLI Commands

bun zx [command] [options]

All ZX CLI commands are available under zig build zx -- [command]. For example, to run auto formatter:

bun build fmt .

Contributing

Contributions are welcome! Feel free to open issues or pull requests. For feature requests, bug reports, or questions, see the Ziex Repo.

Links

About

Ziex Tempolate with Node Package Managers (NPM, Bun, Yarn etc).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors