UNPKG
create-t3-app-fork
Version:
latest (1.0.10)
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Create web application with the t3 stack
github.com/nexxeln/create-t3-app
nexxeln/create-t3-app
create-t3-app-fork
/
template
/
addons
/
trpc
/
example-router.ts
16 lines
(14 loc)
•
329 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
{ createRouter }
from
"./context"
;
import
{ z }
from
"zod"
;
export
const
exampleRouter =
createRouter
().
query
(
"hello"
, {
input
: z .
object
({
text
: z.
string
().
nullish
(), }) .
nullish
(),
resolve
(
{ input }
) {
return
{
greeting
:
`Hello
${input?.text ??
"world"
}
`
, }; }, });