Setting Pakyow for local development with Postgres

In the blog post about connection to postgres, http://notmagic.org/2015/04/10/pakyow-sequel, how do you deal with Postgres setup and required password errors?

I've been developing in Nitrous.io but now setting up local development. So I set the DATABASE_URL as in the post but trying to run pakyow server it gives an error about: "pg::connectionbad: fe_sendauth: no password"

The only user in Postgres is 'postgres' and it has a password associated. It wouldn't let me install without creating a password.

Also, is it bad practice to not have a Postgres password for local dev? Articles about it weren't clear (and were related to Rails) and mentioned database.yml storing the password, which Pakyow doesn't seem to have.

Answers


If you follow the post, you'll want to include the password in the DATABASE_URL environment variable (in your local .env file). The url should be structured like: postgres://user:password@host/database.

It's best to always have a password for your Postgres user, be it locally or in production. You want to make it as difficult as possible for someone to see your data :-)


Need Your Help

How do you split a string at certain character numbers in javascript?

javascript

I want a string split at every single character and put into an array. The string is: