Deploy a static site
This tutorial takes a Vite single-page application and deploys it to Hyjal on the static lane. You end with a live HTTPS URL served by the platform’s static engine, with pre-compressed assets generated at deploy.
Time: about five minutes. You need the hyjal CLI installed
and a logged-in session (hyjal login).
1. Create the site
Scaffold a Vite project. Any static output directory works; this tutorial uses
Vite’s default dist.
Build once locally to confirm the output directory:
The build wrote dist/. That is what Hyjal deploys.
2. Initialize the manifest
Run hyjal init from the project root. It detects the Vite build and writes a
starting hyjal.toml.
Open the generated manifest. It declares one Project, acme, with one
Resource, web, on the static lane:
3. Enable SPA fallback
Vite’s router serves every route from index.html. Set spa = true so unknown
paths rewrite to index.html instead of returning 404.
4. Deploy
Run hyjal deploy. The CLI runs your build, uploads the output to the Project’s
Bucket, generates brotli and gzip variants, and flips the route
atomically.
5. Open the live URL
The site is live. Because static assets carry no compile step, later asset-only redeploys are near-instant.
6. Confirm the request in the logs
Stream logs and reload the page. Each request row carries method, path, status, and latency.
Press Ctrl-C to stop. The same timeline appears in the Console Logs tab.
What you built
- A Vite static site deployed to the
webResource on the static lane. - A live URL at
https://web--acme.hyjal.cloudwith SPA fallback and pre-compressed assets. - Request-correlated logs streaming to your terminal and the Console.
Next steps
- Put it on your own domain: Custom domain tutorial
- Add an API behind the front end: Full-stack tutorial
- Deploy on every git push: Git push to deploy