V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  lshbosheth  ›  全部回复第 3 页 / 共 7 页
回复总数  129
1  2  3  4  5  6  7  
口头语? 那我口头语 你他妈 那可咋办呦 (开玩笑)
@2020583117 我也是初学者 按照我之前 angular 经验和 chatgpt 搞得 。。。
@star505 几年前得有三年了把 讯飞贼爽 后来就不行了 感觉 不智能了 就全用默认输入法了 微软 or apple
@2020583117 {
"builds": [
{
"src": "src/main.ts",
"use": "@vercel/node"
}
],
"routes": [
{ "src": "/(.*)", "dest": "src/main.ts" }
]
}
就这一点 我感觉这个就是个纯入口文件的作用把 和数据库没关系
这是我 ormconfig 配置
import { TypeOrmModuleOptions } from '@nestjs/typeorm';

const VercelConfig: TypeOrmModuleOptions = {
type: 'postgres',
host: 'ep-aged-waterfall-13013279-pooler.us-east-1.postgres.vercel-storage.com',
port: 5432,
username: 'xxx',
password: 'xxx',
database: 'xxx',
ssl: { rejectUnauthorized: false }, // For local development, consider removing this in production
synchronize: true, // Automatically create database tables based on entities (set to false in production)
logging: process.env.NODE_ENV === 'development' ? true : ['error'],
entities: [__dirname + '/**/*.entity{.ts,.js}'],
};

const MySqlLocalConfig: TypeOrmModuleOptions = {
type: 'mysql',
host: 'xxx',
port: 3306,
username: 'root',
password: 'xxx',
database: 'xxx',
synchronize: true,
retryDelay: 500,
retryAttempts: 10,
autoLoadEntities: true,
logging: process.env.NODE_ENV === 'development' ? true : ['error'],
};

export { VercelConfig, MySqlLocalConfig };
具体我也不懂 哈哈哈
直接 app.module 就用了 TypeOrmModule.forRoot(MySqlLocalConfig)
然后 再 service 里直接整就完事了
@2020583117 我感觉和这个配置没关系把 这个无非也就是类似入口文件的 作用 ?
我连我服务器的 mysql 还是 vercel 的 pq 数据库 都可以,,,
22 天前
回复了 Gavin999 创建的主题 OpenAI ChatGPT 又出问题了吗?
先用 coze 呗 我就是这样
23 天前
回复了 ccOfd 创建的主题 职场话题 工位旁边的饮水机又没水了,
我喝我的苏打水 有水没水关我毛事
@saranz 百公里两个馒头
@sanwang566123 啊 iqoo 感觉还可以啊 不过我是红米忠实用户 红米 iphone 双持 爽
iqoo z9 t 那个不是 6000 电池 不到 2k
看看紫米 现在改名了 酷态科 那才叫充电宝 不知名的和火车站那种有啥区别
给时间 就行 这种是很正确的流程啊 0.0 正常就应该开会时间大于开发时间 开会就把如何实现与波及分析都做了 写代码不就是按部就班嘛
@iOSwang 女朋友扛不住 这个啥意思 老哥
1  2  3  4  5  6  7  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5235 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 30ms · UTC 08:55 · PVG 16:55 · LAX 01:55 · JFK 04:55
Developed with CodeLauncher
♥ Do have faith in what you're doing.