results from npm create t3-app@latest

This commit is contained in:
Brandon Egger
2023-03-14 22:56:03 -05:00
commit a67c21a254
25 changed files with 8785 additions and 0 deletions

View File

@ -0,0 +1,4 @@
import NextAuth from "next-auth";
import { authOptions } from "~/server/auth";
export default NextAuth(authOptions);

View File

@ -0,0 +1,19 @@
import { createNextApiHandler } from "@trpc/server/adapters/next";
import { env } from "~/env.mjs";
import { createTRPCContext } from "~/server/api/trpc";
import { appRouter } from "~/server/api/root";
// export API handler
export default createNextApiHandler({
router: appRouter,
createContext: createTRPCContext,
onError:
env.NODE_ENV === "development"
? ({ path, error }) => {
console.error(
`❌ tRPC failed on ${path ?? "<no-path>"}: ${error.message}`,
);
}
: undefined,
});