Skip to content

Commit

Permalink
chore(ReadMe) : Update ReadMe
Browse files Browse the repository at this point in the history
- Change datadase name from wired_dev to wire_dev
- Remove unnecessary instruction
[Finishes #165149995]
  • Loading branch information
nakimera committed Apr 12, 2019
1 parent 6390211 commit 7d9ebb0
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ WIRE-API powers [WIRE](https://github.com/AndelaOSP/wire)

Ensure you have the following installed locally:

* [Postgres](https://www.postgresql.org/)
- [Postgres](https://www.postgresql.org/)

* [Node](https://nodejs.org/en/)
- [Node](https://nodejs.org/en/)

Clone repo:

```
git clone https://github.com/AndelaOSP/wire-api.git
```

Navigate to repo:

```
cd wire-api/src
```
Expand All @@ -29,25 +31,26 @@ Install all dependencies:
yarn install
```

Start Postgres and create `wired_dev` database if it does not exist.
Start Postgres and create a database named `wire_dev` if it does not exist.

Set up the environment variables appropriately by renaming `.env.example` to `.env` and updating it with the required values described below:
- NODE_ENV : environment you are running on (`development` for local setup)
- DATABASE_URL : Postgres url for the database (`postgres://localhost:5432/wire_dev` for local setup)
- PORT : port in which the app will be listening (`3000` for local setup)
- SECRET_KEY : secret key used to generate the api tokens
- EMAIL_SENDER : email address used to send invite emails (consult team lead)
- EMAIL_PASSWORD : password for the above email address
- SLACK_BUG_WEBHOOK_URL : webhook url for sending api errors to slack (consult team lead)
- EMAIL_VERIFICATION_URL : andela user service endpoint for listing users (consult team lead)
- API_TOKEN : authorization token used while querying the user service (consult team lead)
Set up the environment variables appropriately by renaming `.env.example` to `.env`.

Setup database url for migrations:
```
export DATABASE_URL = postgres://localhost:5432/wire_dev
```
Ensure the `.env` file has the following key value pairs for your local setup


| Key | Description | Value |
| ---------------------- | -------------------------------------------------------- | ---------------------------------- |
| NODE_ENV | Environment you are running the app | development |
| DATABASE_URL | Postgres url for the database | postgres://localhost:5432/wire_dev |
| PORT | Port the app is listening to | 3000 |
| SECRET_KEY | Secret key used to generate the api tokens | consult team lead |
| EMAIL_SENDER | Email address used to send invite emails | consult team lead |
| EMAIL_PASSWORD | Password for the above email address | consult team lead |
| EMAIL_VERIFICATION_URL | Andela user service endpoint for listing users | consult team lead |
| API_TOKEN | Authorization token used while querying the user service | consult team lead |

Run migrations and seeders:

```
yarn run migrate-seed
```
Expand All @@ -65,6 +68,7 @@ Navigate to the port and test the endpoints on postman
<img width="1097" alt="wire-api" src="https://user-images.githubusercontent.com/16113214/30543777-f7e5ad12-9c8c-11e7-80e0-b5fd3fa36546.png">

### Api Documentation
The API documentation can be found here:

The API documentation can be found here:

[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.getpostman.com/collections/36756909f8349f8b606f)

0 comments on commit 7d9ebb0

Please sign in to comment.