在文档中只是显示与本地数据库的连接的示例:
'ormconfig.json'
{
"type": "mysql",
"host": "localhost",
"port": 3306,
"username": "test",
"password": "test",
"database": "test"
}
我想连接基于在线的ElephantSQL,但找不到解决方案。
我能够连接,这是我的解决方案。
{
"name": "default",
"type": "postgres",
"url": <URL>,
"synchronize": true,
"logging": true,
"entities": ["src/entity/*.*"]
}
URL是URL字符串,类似于“ postgres:// xxxxx:5432 / xxxx”