|
| 1 | +# Ziex App with Node Package Managers |
| 2 | + |
| 3 | +>This is a starter template for building web applications with [Ziex](https://ziex.dev), a full-stack web framework for Zig. |
| 4 | +
|
| 5 | +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). |
| 6 | + |
| 7 | +**[Documentation →](https://ziex.dev)** |
| 8 | + |
| 9 | + |
| 10 | +## Install Dependencies |
| 11 | + |
| 12 | +You can use `bun`/`npm`/`yarn`/`pnpm` or any other Node package manager, the following guides uses Bun as an example. |
| 13 | + |
| 14 | + |
| 15 | +```bash |
| 16 | +bun install |
| 17 | +``` |
| 18 | + |
| 19 | +## Usage |
| 20 | + |
| 21 | +### Development |
| 22 | +```bash |
| 23 | +bun dev |
| 24 | +``` |
| 25 | +App will be available at [`http://localhost:3000`](http://localhost:3000). with hot reload enabled. |
| 26 | + |
| 27 | +### Serve Production Build |
| 28 | +```bash |
| 29 | +bun serve |
| 30 | +``` |
| 31 | + |
| 32 | +### Exporting as Static Site |
| 33 | +```bash |
| 34 | +bun export |
| 35 | +``` |
| 36 | +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. |
| 37 | + |
| 38 | +### Deployment |
| 39 | + |
| 40 | +```bash |
| 41 | +bun bundle |
| 42 | +``` |
| 43 | + |
| 44 | +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. |
| 45 | + |
| 46 | + |
| 47 | +### [ZX CLI](https://ziex.dev/reference#cli) Commands |
| 48 | +```bash |
| 49 | +bun zx [command] [options] |
| 50 | +``` |
| 51 | + |
| 52 | +All ZX CLI commands are available under `bun zx [command]`. For example, to run auto formatter: |
| 53 | +```bash |
| 54 | +bun zx fmt . |
| 55 | +``` |
| 56 | + |
| 57 | +## Contributing |
| 58 | + |
| 59 | +Contributions are welcome! Feel free to open issues or pull requests. For feature requests, bug reports, or questions, see the [Ziex Repo](https://github.com/ziex-dev/ziex). |
| 60 | + |
| 61 | +## Links |
| 62 | + |
| 63 | +- [Documentation](https://ziex.dev) |
| 64 | +- [Discord](https://ziex.dev/r/discord) |
| 65 | +- [Topic on Ziggit](https://ziex.dev/r/ziggit) |
| 66 | +- [Project on Zig Discord Community](https://ziex.dev/r/zig-discord) (Join Zig Discord first: https://discord.gg/zig) |
| 67 | +- [GitHub](https://github.com/nurulhudaapon/ziex) |
| 68 | +- [Zig Language](https://ziglang.org/) |
0 commit comments