Revert "feat: add file routing option"

This reverts commit 750783e860.
This commit is contained in:
wobsoriano
2022-11-05 21:24:24 -07:00
parent c11a5cfa8a
commit 1fc4d9d0d0
22 changed files with 435 additions and 318 deletions

View File

@@ -0,0 +1,23 @@
import { createNuxtApiHandler } from 'trpc-nuxt'
import { appRouter } from '@/server/trpc/routers'
import { createContext } from '@/server/trpc/context'
export default createNuxtApiHandler({
router: appRouter,
/**
* @link https://trpc.io/docs/context
*/
createContext,
onError ({ error }) {
if (error.code === 'INTERNAL_SERVER_ERROR') {
// send to bug reporting
console.error('Something went wrong', error)
}
}
/**
* @link https://trpc.io/docs/caching#api-response-caching
*/
// responseMeta() {
// // ...
// },
})