I am writing an application in Shiny in R. Global.R is described as below to connect to PostgresSQL.
library(shiny)
library(DBI)
library(RPostgres)
library(RPostgreSQL)
library(pool)
pool <- dbPool(
drv = RPostgreSQL::PostgreSQL(max.con=10000),
dbname = "postgres",
host = "shiny.com...",
user = "postgres",
password = "passward",
idleTimeout = 3600000
)
I can connect without problems, but I am reluctant to write the password directly in global.R. Is there a good way to hide the password or write it somewhere else to read it? Thank you