Home > Software design >  what is the connection string using alwaysdata with scala
what is the connection string using alwaysdata with scala

Time:12-03

i am using Scala with play and slick.

    scalaVersion := "2.13.10"

libraryDependencies  = guice
libraryDependencies  = "org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % Test
libraryDependencies  =  "org.postgresql" % "postgresql" % "42.5.0"
libraryDependencies  = "com.typesafe.play" %% "play-slick" % "5.1.0"

and in my application.conf:

slick.dbs.default.profile = "slick.jdbc.PostgresProfile$"
slick.dbs.default.db.driver = "org.postgresql.Driver"
slick.dbs.default.db.url = "postgresql-stevapp.alwaysdata.net:5432"
slick.dbs.default.db.user = "XXXX"
slick.dbs.default.db.password="YYYYY"

i got this error enter image description here

CodePudding user response:

The URL should be a JDBC URL in the form jdbc:postgres://postgresql-stevapp.alwaysdata.net:5432/mydb?someParam=someValue.

  • Related