Using tools
I tried to send a post request to server from postman and swagger api doc. But I got this error for both.
unknown error: Code: UNAVAILABLE
server does not allow insecure connections, client must use SSL/TLS
I could send post requests when using localhost. But after deploying app on heroku, I cannot do that anymore.
In the documentation explain how to load the certificates
const sequelize = new Sequelize({
dialect: 'mysql',
username: MYSQL_USER,
password: MYSQL_PASSWORD,
host: MYSQL_HOST,
dialectOptions: {
bigNumberStrings: true,
ssl: {
ca: fs.readFileSync(__dirname + '/ca-certificates.crt')
}
}
})