fix: Use the default admin port in create medusa app env definition (#9439)

This commit is contained in:
Stevche Radevski authored and GitHub committed 2024-10-03 09:53:57 +02:00
1 parent 21badd069d
commit bffb36cd11
1 file changed
+7 -2
@@ -10,7 +10,7 @@ import type { Client } from "pg"
const ADMIN_EMAIL = "admin@medusa-test.com"
const STORE_CORS = "http://localhost:8000,https://docs.medusajs.com"
const ADMIN_CORS =
"http://localhost:7000,http://localhost:7001,https://docs.medusajs.com"
"http://localhost:5173,http://localhost:9000,https://docs.medusajs.com"
const AUTH_CORS = ADMIN_CORS
const DEFAULT_REDIS_URL = "redis://localhost:6379"
@@ -242,7 +242,12 @@ export default async ({
)
if (apiKeys.rowCount) {
const nextjsEnvPath = path.join(nextjsDirectory, fs.existsSync(path.join(nextjsDirectory, ".env.local")) ? ".env.local" : ".env.template")
const nextjsEnvPath = path.join(
nextjsDirectory,
fs.existsSync(path.join(nextjsDirectory, ".env.local"))
? ".env.local"
: ".env.template"
)
const originalContent = fs.readFileSync(nextjsEnvPath, "utf-8")