Files
trpc-nuxt/docs/content/1.get-started/1.installation.md
2022-12-18 23:33:47 -08:00

47 lines
872 B
Markdown

---
title: Installation
description: tRPC-Nuxt provides first class integration with tRPC.
---
# Installation
::code-group
```bash [pnpm]
pnpm add @trpc/server @trpc/client trpc-nuxt zod
```
```bash [npm]
npm install @trpc/server @trpc/client trpc-nuxt zod
```
```bash [yarn]
yarn add @trpc/server @trpc/client trpc-nuxt zod
```
::
```ts [nuxt.config.ts]
export default defineNuxtConfig({
build: {
transpile: ['trpc-nuxt/client']
}
})
```
#### Why @trpc/server?
For implementing tRPC endpoints and routers.
#### Why @trpc/client?
For making typesafe API calls from your client.
#### Why zod?
Most examples use [Zod](https://github.com/colinhacks/zod) for input validation and tRPC.io highly recommends it, though it isn't required.
## Next Steps
Now that you've installed the required dependencies, you are ready to start building your application.