diff --git a/README.md b/README.md index f6b98710..e1cc0e1b 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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 ``` @@ -65,6 +68,7 @@ Navigate to the port and test the endpoints on postman wire-api ### 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)