Run API endpoints, SSR, mobile & desktop from a single codebase.
We leverage two builds for this, one node and one static. The node build serves the API and SSR and the static build calls the node build for API and is used for mobile (capacitor) and desktop (tauri).
npm i
This is the default mode, you need to run this for the static adapters to work since they will call this server for API.
npm run dev:node
This will not work unless you're also running the node adapter.
npm run dev:static
Pretty much same as dev mode, preview will build & preview by default.
npm run preview:node
npm run preview:static
(requires rust toolchain locally)
npx tauri dev
(will require you to have either an iOS or an android emulator locally)
npx cap sync
npx cap run android # or ios
npx tauri build
npm run build:node
node build-node/index.js