- Clone the repository:
git clone https://github.com/robertwayne/template-axum-solidjs-spa
- Change
.env.TEMPLATE
to.env
and set your Postgres credentials (if not using defaults). - Build the client with
pnpm run build
from inside the/client
directory. Alternatively, you can usepnpm run dev
to run the client with vite dev server. - Run the server with
cargo run
from inside the/server
directory.- If you're serving from axum, visit
http://127.0.0.1:3000
. - If you're serving from vite, visit
http://127.0.0.1:8000
.
- If you're serving from axum, visit
- Async, naive prefetching for route links.
- Light/Dark mode themes built-in.
- Responsive navigation menu built-in.
- Scripts use pnpm.
- Sets Cache Control headers for HTML, CSS, JS, WEBP, SVG, and WOFF2.
- Uses tower-http CORS, Compression (gzip), and CSP middleware.
- Runs (client) tests, eslint, tsc, and prettier on PRs.
- Runs dependabot weekly. You can manually run
combine
to squish all dependabot PRs into one PR. - Server tests/formatting are not run on PR (yet).
Command | Action |
---|---|
./update.sh | Updates the dependencies of both the client and server projects. |