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

@@ -2,4 +2,5 @@ export const Config = {
jwt_secret:
"T4kE6/tIqCVEZYg9lwsqeJjYfOoXTXSXDEMyParsJjj57CjSdkrfPOLWP74/9lJpcBA=",
token_duration: "365d",
api_url: "http://localhost:3000",
};

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(