Revert "removed cors"
All checks were successful
backend-action / build-image (push) Successful in 24s
All checks were successful
backend-action / build-image (push) Successful in 24s
This reverts commit 8854022fac.
This commit is contained in:
@@ -2,6 +2,7 @@ import { createContext, router } from "./trpc";
|
||||
import { createHTTPServer } from "@trpc/server/adapters/standalone";
|
||||
import { userRoute } from "./userRoute";
|
||||
import { runPlayground } from "./playgroud";
|
||||
import cors from "cors";
|
||||
import { infoRoute } from "./infoRoute";
|
||||
|
||||
export const appRouter = router({
|
||||
@@ -14,6 +15,10 @@ async function main() {
|
||||
const server = createHTTPServer({
|
||||
createContext: createContext,
|
||||
router: appRouter,
|
||||
middleware:
|
||||
(process.env.NODE_ENV ?? "development") == "production"
|
||||
? undefined
|
||||
: cors(),
|
||||
});
|
||||
|
||||
server.listen(3000);
|
||||
|
||||
Reference in New Issue
Block a user