{"action":"created","issue":{"url":"https://api.github.com/repos/johnkariuki/bookmark/issues/2","repository_url":"https://api.github.com/repos/johnkariuki/bookmark","labels_url":"https://api.github.com/repos/johnkariuki/bookmark/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/johnkariuki/bookmark/issues/2/comments","events_url":"https://api.github.com/repos/johnkariuki/bookmark/issues/2/events","html_url":"https://github.com/johnkariuki/bookmark/issues/2","id":172355026,"number":2,"title":"Unable to connect to database: SequelizeConnectionError: role \"postgres\" does not exist","user":{"login":"connor11528","id":3578908,"avatar_url":"https://avatars.githubusercontent.com/u/3578908?v=3","gravatar_id":"","url":"https://api.github.com/users/connor11528","html_url":"https://github.com/connor11528","followers_url":"https://api.github.com/users/connor11528/followers","following_url":"https://api.github.com/users/connor11528/following{/other_user}","gists_url":"https://api.github.com/users/connor11528/gists{/gist_id}","starred_url":"https://api.github.com/users/connor11528/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connor11528/subscriptions","organizations_url":"https://api.github.com/users/connor11528/orgs","repos_url":"https://api.github.com/users/connor11528/repos","events_url":"https://api.github.com/users/connor11528/events{/privacy}","received_events_url":"https://api.github.com/users/connor11528/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-22T01:40:07Z","updated_at":"2016-09-01T08:51:03Z","closed_at":null,"body":"I am running on Mac and tried to fire up this project. When I run the migration command I get an error that says I cannot connect to database. \r\n\r\n\r\n```\r\n$ sequelize db:migrate \r\n\r\nSequelize [Node: 6.0.0, CLI: 2.4.0, ORM: 3.24.1]\r\n\r\n(node:62574) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.\r\nLoaded configuration file \"server/config/config.js\".\r\nUsing environment \"development\".\r\nUnable to connect to database: SequelizeConnectionError: role \"postgres\" does not exist\r\n```\r\n\r\nI think I need to create and setup the database. What are the steps I need to do this?\r\n\r\nBased on the [SO post](http://stackoverflow.com/questions/21122598/postgres-user-does-not-exist)  I ran these commands:\r\n\r\n```\r\n$ psql -U postgres\r\npsql: FATAL:  role \"postgres\" does not exist\r\n\r\n$ psql\r\npsql: FATAL:  database \"connorleech\" does not exist\r\n```\r\n\r\nHow do I set up the postgres database and connect this app to it? Thank you"},"comment":{"url":"https://api.github.com/repos/johnkariuki/bookmark/issues/comments/244016760","html_url":"https://github.com/johnkariuki/bookmark/issues/2#issuecomment-244016760","issue_url":"https://api.github.com/repos/johnkariuki/bookmark/issues/2","id":244016760,"user":{"login":"johnkariuki","id":16223627,"avatar_url":"https://avatars.githubusercontent.com/u/16223627?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkariuki","html_url":"https://github.com/johnkariuki","followers_url":"https://api.github.com/users/johnkariuki/followers","following_url":"https://api.github.com/users/johnkariuki/following{/other_user}","gists_url":"https://api.github.com/users/johnkariuki/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkariuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkariuki/subscriptions","organizations_url":"https://api.github.com/users/johnkariuki/orgs","repos_url":"https://api.github.com/users/johnkariuki/repos","events_url":"https://api.github.com/users/johnkariuki/events{/privacy}","received_events_url":"https://api.github.com/users/johnkariuki/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T08:51:03Z","updated_at":"2016-09-01T08:51:03Z","body":"If you take a look at `/server/config/config.js`, you will notice that the postgres connection Url is `postgres://postgres:password@localhost:5432/bookmark`.\r\n\r\nThis means that the Postgtress database `bookmark` connects through a user/role `postgres`. \r\nYou can either.\r\n\r\nEdit the url to match a user/role that exists in your psql setup.\r\n`postgres://<custom_role>:password@localhost:5432/bookmark`\r\n\r\nOR\r\n\r\nCreate the Postgres role using the psql command and assign the bookmark database to your new user;\r\n\r\n- Login to the Postgres prompt interface:\r\n`psql`\r\n\r\n- Create a new role\r\n`CREATE ROLE new_role;`\r\n\r\n- Assign the new role to your database\r\n`GRANT ALL PRIVILEGES ON DATABASE bookmark to new_role`\r\n\r\nI hope this helps."}}
{"actor":{"display_login":"johnkariuki"}}