zksu
/
API
forked from yoone/API
1
0
Fork 0
API/src/config/config.local.ts

55 lines
1.4 KiB
TypeScript

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: 'localhost',
port: "23306",
username: 'root',
password: '12345678',
database: 'inventory_v2',
},
},
},
cors: {
origin: '*', // 允许所有来源跨域请求
allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], // 允许的 HTTP 方法
allowHeaders: ['Content-Type', 'Authorization'], // 允许的自定义请求头
credentials: true, // 允许携带凭据(cookies等)
},
jwt: {
secret: 'YOONE2024!@abc',
expiresIn: '7d',
},
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',
},
uniExpress: {
url: 'https://sjqa.uniexpress.org', // 测试环境url
// url: 'https://sj.uniexpress.ca', //正式环境url
clientId: '101018',
clientSecret: 'cbcb51bea204f3f69c47b5280064408e',
customerNo: 2067,
}
} as MidwayConfig;