Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#81] Update docs #82

Merged
merged 5 commits into from
Jul 3, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,45 @@ encourage more programmers to become a part of the Haskell community.

## Prerequisites (what you need to have locally)

Coming Soon
For the project to build, you will need to have `libpq-dev` installed on you computer. You can install it by running the command `sudo apt install libpq-dev`.

You will also need to setup Postgres on your computer. Here are the instructions for doing so:

1. Run the folowing commands with `<username>` replaced by a username of your choice.

```
$ sudo apt install postgresql postgresql-contrib
$ sudo service postgres start
$ sudo -u postgres psql
rashadg1030 marked this conversation as resolved.
Show resolved Hide resolved
postgres=# create database "issue-wanted";
postgres=# create user <username>;
postgres=# grant all privileges on database "issue-wanted" to <username>;
```

2. Modify the [`pg_hba.conf`](https://dba.stackexchange.com/questions/101280/how-to-handle-user-with-no-password-in-postgresql) file with the following lines.

```
local all <username> trust
host all <username> 0.0.0.0/0 trust
```

Where `<username>` is the same one you used above.

3. Next, in the `config.toml` file in the repository update the line `user=<username>` with the `<username>` from above.

4. Add the line `listen_address = '127.0.0.1'` to the `/etc/postgresql/10/main/postgresql.conf` file.

5. Finally, restart the database and intitalize it with the following commands.

```
$ sudo service postgres restart
$ psql issue-wanted < sql/schema.sql
$ psql issue-wanted < sql/seed.sql
```

Follow the instructions under [`How to run server`](https://github.com/kowainik/issue-wanted/tree/rashadg1030/81-Document-Postgres-setup#how-to-run-server) and test the endpoints to see if everything is set up correctly.

Refer to issue [#81](https://github.com/kowainik/issue-wanted/issues/81) if you're still having trouble.

## How to build

Expand Down