mobimeo / teamchatviz

#teamchatviz
https://moovel.github.io/teamchatviz
Other
144 stars 24 forks source link

document database creation step in postgres in README.md #54

Closed micahstubbs closed 7 years ago

micahstubbs commented 7 years ago

this projects looks fantastic. I'm stuck at this point of the dev setup described in the README.md:

npm run up

after which I see:

[ERROR] error: role "teamchatviz" does not exist

I'm sure that this step is obvious if you work with postgres all the time. that said, it would be super helpful. to document the things you need to do before you can run npm run up successfully 😄

screen shot 2016-07-30 at 3 06 07 pm

OrKoN commented 7 years ago

Hi @micahstubbs,

in order to create a DB in Postgres you need to start psql. On Linux systems you can run sudo -u postgres psql. On OS X you can start it via the UI of Postgres.app.

Once you are in, you can run the following commands to create a user called teamchatviz with the password teamchatviz and a database called teamchatviz:

CREATE DATABASE teamchatviz;
CREATE ROLE teamchatviz WITH LOGIN CREATEDB PASSWORD 'teamchatviz';
ALTER USER teamchatviz VALID UNTIL 'infinity';
ALTER DATABASE teamchatviz OWNER TO teamchatviz;
GRANT ALL ON DATABASE teamchatviz TO teamchatviz;
\c teamchatviz
ALTER SCHEMA public OWNER TO teamchatviz;

Please let me know if this worked for you and I will add it to the README.

micahstubbs commented 7 years ago

starting psql from the postgres mac gui

screen shot 2016-07-31 at 1 35 01 pm

screen shot 2016-07-31 at 1 35 18 pm

screen shot 2016-07-31 at 1 35 25 pm

micahstubbs commented 7 years ago

I think the migration succeeded

screen shot 2016-07-31 at 1 41 00 pm

micahstubbs commented 7 years ago

it works! now have teamchatviz up and running locally 🎉 🙏 @OrKoN 👍 for adding the text to the README.md 😄

here's the emoji timeline for one of my teams: screen shot 2016-07-31 at 1 57 21 pm

OrKoN commented 7 years ago

thanks @micahstubbs I have added the steps to the README. I am happy that you like the project! Please let me know if you have further questions about the setup or if you have any ideas about improving the project or adding new features!