From 3750b15298e2257301676a499fe66de4b27ad0a9 Mon Sep 17 00:00:00 2001 From: cll <931958862@qq.com> Date: Fri, 23 May 2025 14:53:12 +0800 Subject: [PATCH] fix --- src/config/config.local.ts | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/config/config.local.ts diff --git a/src/config/config.local.ts b/src/config/config.local.ts new file mode 100644 index 0000000..ffec600 --- /dev/null +++ b/src/config/config.local.ts @@ -0,0 +1,61 @@ +import { MidwayConfig } from '@midwayjs/core'; +export default { + koa: { + port: 7001, + }, + typeorm: { + dataSource: { + default: { + host: '13.212.62.127', + username: 'root', + password: 'Yoone!@.2025', + }, + }, + }, + // typeorm: { + // dataSource: { + // default: { + // host: '127.0.0.1', + // username: 'root', + // password: '123456', + // }, + // }, + // }, + cors: { + origin: '*', // 允许所有来源跨域请求 + allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], // 允许的 HTTP 方法 + allowHeaders: ['Content-Type', 'Authorization'], // 允许的自定义请求头 + credentials: true, // 允许携带凭据(cookies等) + }, + jwt: { + secret: 'YOONE2024!@abc', + expiresIn: '7d', + }, + wpSite: [ + { + id: '-1', + siteName: 'Admin', + email: 'tom@yoonevape.com', + }, + { + id: '2', + wpApiUrl: 'http://localhost:10004', + consumerKey: 'ck_dc9e151e9048c8ed3e27f35ac79d2bf7d6840652', + consumerSecret: 'cs_d05d625d7b0ac05c6d765671d8417f41d9477e38', + siteName: 'Local', + email: 'tom@yoonevape.com', + emailPswd: 'lulin91.', + }, + ], + freightcom: { + url: 'https://customer-external-api.ssd-test.freightcom.com', + token: '6zGj1qPTL1jIkbLmgaiYc6SwHUIXJ2t25htUF8uuFYiCg8ILCY6xnBEbvrX1p79L', + }, + canadaPost: { + url: 'https://ct.soa-gw.canadapost.ca', + username: '65d23d3a75d7baf7', + password: '56443bb98b68dfdd60f52e', + customerNumber: '0006122480', + contractId: '0044168528', + }, +} as MidwayConfig;