From 75e0a0192de21749bb70234fcc48f3141e82fb9b Mon Sep 17 00:00:00 2001 From: Max Schmidt Date: Wed, 17 May 2023 17:30:59 +0200 Subject: [PATCH] test Signed-off-by: Max Schmidt --- astro/src/utils/payload.ts | 7 +++---- payload/package.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/astro/src/utils/payload.ts b/astro/src/utils/payload.ts index 7a3504c..6a80c99 100644 --- a/astro/src/utils/payload.ts +++ b/astro/src/utils/payload.ts @@ -1,9 +1,8 @@ import type { Post } from "../types"; -const url = - import.meta.env.NODE_ENV === "development" - ? "http://payload:3001" - : `https://${import.meta.env.PAYLOAD_URL}`; +const url = import.meta.env.DEV + ? "http://payload:3001" + : `https://${import.meta.env.PAYLOAD_URL}`; export const getPosts = async () => (await (await fetch(`${url}/api/posts`)).json()).docs as Post[]; diff --git a/payload/package.json b/payload/package.json index 99a648e..32ec632 100644 --- a/payload/package.json +++ b/payload/package.json @@ -9,7 +9,7 @@ "build:payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload build", "build:server": "tsc", "build": "yarn build:payload && yarn build:server", - "serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.ts node dist/server.js", + "serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js node dist/server.js", "generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types" }, "dependencies": {