A sample app using ts-rest.
npm install @ts-rest/core
npm install zod
npm install --save-dev typescript
tsc --init
Make sure that strict
in tsconfig.json
is true
if you use the app with zod
, otherwise you may face performance issues #162
npm init @eslint/config
✔ How would you like to use ESLint? · problems
✔ What type of modules does your project use? · esm
✔ Which framework does your project use? · react
✔ Does your project use TypeScript? · Yes
✔ Where does your code run? · browser
✔ What format do you want your config file to be in? · YAML
✔ Would you like to install them now? · Yes
✔ Which package manager do you want to use? · npm
npm install --save-dev --save-exact prettier
echo {}> .prettierrc.json
npm install --save-dev eslint-config-prettier
npm install --save-dev eslint-plugin-import eslint-plugin-unused-imports
npm install express
npm install cors
npm install --save-dev @types/express @types/cors
npm install @ts-rest/express
# or
npm install @ts-rest/nest
# or
npm install @ts-rest/next
npm install @tanstack/react-query
npm install @ts-rest/react-query
npm install react react-dom
npm install --save-dev @types/react @types/react-dom
npm install --save-dev vite @vitejs/plugin-react @types/node
touch vite.config.ts
mkdir public
touch public/index.html
touch src/client/index.tsx
npm install --save-dev concurrently
npm install --save-dev ts-node