Skip to content

Example for using tRPC both on the server and on the client

License

Notifications You must be signed in to change notification settings

zupzup/trpc-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

trpc-example

Example for using tRPC both on the server and on the client

Start the server using the ./run.sh script inside the server folder and run the client by running npm start inside the client folder.

Endpoints;

// create a new cat
curl -X POST "http://localhost:8080/cat/create" -d '{"name": "Minka" }' -H 'content-type: application/json'

// list all cats
curl "http://localhost:8080/cat/list"

// get a cat by id
curl "http://localhost:8080/cat/get?input=1234"

// delete a cat
curl -X POST  "http://localhost:8080/cat/delete" -d '{"id": 1234}' -H 'content-type: application/json'

About

Example for using tRPC both on the server and on the client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages