Based on a react-vite-trpc template
Stack | Quick start | Challenge | Scripts | Env | Ports | License |
---|
It is possible to deploy the full app, or to separately deploy the frontend and backend.
- Frontend via Vercel: https://vite-express-trpc-mvp-web.vercel.app/
- Backend via Render: https://studio-server-a2l0.onrender.com/trpc/hello.world
For local execution, use pnpm install
and turbo dev
.
Command | Description |
---|---|
pnpm start |
Runs the production build of the server (/server ) |
pnpm dev |
Launches apps and bundles all packages in watch mode |
pnpm lint |
Performs an eslint check through all workspaces |
pnpm lint:fix |
Performs an eslint fix through all workspaces |
pnpm ts:check |
Performs a TypeScript check through all workspaces |
pnpm ts:references |
Syncs TypeScript references in all tsconfig.json files + updates nodemon.json watch array |
pnpm stylelint |
Performs an stylelint check through all workspaces |
pnpm check |
Performs eslint, TypeScript, and stylelint checks through all workspaces |
pnpm build |
Builds all apps |
pnpm build:lib |
Bundles all packages |
pnpm postinstall |
Ensures that local or CI environment is ready after installing packages |
turbo dev |
Runs server and web in dev |
turbo build |
Builds all packages and apps |
Envs are validated with the package envalid
. Check out .env-example
& .env.test-example
files
If the pnpm dev
script is executed without the required environment variables, the application will output similar details in the console:
================================
Missing environment variables:
PORT: Port the Express server is running on (eg. "3001"). See https://expressjs.com/en/starter/hello-world.html
================================
## 🌐 Ports for Local Dev
- 🌐 :3000 - Web
- 🖥️ :3001 - Server