This is my db config for dev
config :rest_api, RestApi.Repo,
username: “phoenix”,
password: “postgres”,
database: “rest_api_dev”,
hostname: “localhost”,
show_sensitive_data_on_connection_error: true,
pool_size: 10
It was working perfectly fine yesterday when i created and started learning elixir but today when i try to start the server with mix phs.server the server starts but getting this error with db connection
[error] Postgrex.Protocol (#PID<0.375.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (localhost:5432): network is unreachable - :enetunreach
I am running phoenix in wsl windows newbie to phoenix so kindly help even if it is a small fix