- Clone the repository:
git clone https://github.com/robertwayne/template-rocket-svelte-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 Rocket, 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 Rocket, visit
- Async, lazy loading route wrappers.
- Responsive navigation menu built-in.
- Sets Cache Control headers for HTML, CSS, JS, WEBP, SVG, and WOFF2.
- Sets CORS and CSP headers.
- Includes a PostgreSQL fairing, which is disabled by default. Add this fairing
in
main.rs
if you wish to use it.
- 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. |