Configuring PostgreSQL on Play! 2.6

Viewed 2170

I have a PostgreSQL(v9.6) instance running on my machine. The database is called 'postgres'. I've managed to open the application in pgAdmin 3 using localhost:5432. In my Play! application(v2.6.2) I have added the driver and the url to the application.conf file following the tutorial here and I have added the javaJdbc dependency to my build.sbt file. So I have the following:

db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://localhost:5432/postgres"
db.default.username = "user"
db.default.password = "pass"

When I run the application though I get this error in the console:

Cannot connect to database [default]

Could somebody explain to me why this is the case? I can provide more information if I need to.

1 Answers
Related