回答編集履歴
1
対応内容を追記しました。
answer
CHANGED
@@ -16,4 +16,30 @@
|
|
16
16
|
```
|
17
17
|
|
18
18
|
|
19
|
-
なお、返答される結果は、ホストOS、PostgreSQL 等のバージョンにより異なりますため、ご注意ください。
|
19
|
+
なお、返答される結果は、ホストOS、PostgreSQL 等のバージョンにより異なりますため、ご注意ください。
|
20
|
+
|
21
|
+
---
|
22
|
+
|
23
|
+
【追記】
|
24
|
+
以下の設定変更で接続できるそうです。
|
25
|
+
|
26
|
+
```node.js
|
27
|
+
const Sequelize = require('sequelize');
|
28
|
+
|
29
|
+
// herokuまたはローカル環境のPostgreSQLに接続する
|
30
|
+
const sequelize = new Sequelize(
|
31
|
+
process.env.DATABASE_URL || 'postgres://postgres:postgres@localhost/app'
|
32
|
+
);
|
33
|
+
|
34
|
+
↓
|
35
|
+
|
36
|
+
const Sequelize = require('sequelize');
|
37
|
+
|
38
|
+
const sequelize = new Sequelize(
|
39
|
+
process.env.DATABASE_URL || 'postgres://postgres:postgres@localhost/app',
|
40
|
+
{dialectOptions: { ssl: true }}
|
41
|
+
);
|
42
|
+
```
|
43
|
+
|
44
|
+
参照元;
|
45
|
+
[herokuデプロイ後sequelizeでPostgreSQLに接続できないときの解決法](https://qiita.com/manten120/items/74eab4ff2b4370553275)
|