added plaground endpoint configuration

This commit is contained in:
2024-04-19 20:39:30 +07:00
parent 7ab206943e
commit 01c2838aef
7 changed files with 182 additions and 1 deletions

View File

@@ -1,11 +1,12 @@
import express from "express";
import { expressHandler } from "trpc-playground/handlers/express";
import { AppRouter } from "./app";
import { Config } from "./config";
export const runPlayground = async (appRouter: AppRouter) => {
const app = express();
const trpcApiEndpoint = "http://localhost:3000";
const trpcApiEndpoint = Config.api_url;
const playgroundEndpoint = "/";
app.use(