@@ -9,16 +9,18 @@ WIRE-API powers [WIRE](https://github.com/AndelaOSP/wire)
9
9
10
10
Ensure you have the following installed locally:
11
11
12
- * [ Postgres] ( https://www.postgresql.org/ )
12
+ - [ Postgres] ( https://www.postgresql.org/ )
13
13
14
- * [ Node] ( https://nodejs.org/en/ )
14
+ - [ Node] ( https://nodejs.org/en/ )
15
15
16
16
Clone repo:
17
+
17
18
```
18
19
git clone https://github.com/AndelaOSP/wire-api.git
19
20
```
20
21
21
22
Navigate to repo:
23
+
22
24
```
23
25
cd wire-api/src
24
26
```
@@ -29,25 +31,26 @@ Install all dependencies:
29
31
yarn install
30
32
```
31
33
32
- Start Postgres and create ` wired_dev ` database if it does not exist.
34
+ Start Postgres and create a database named ` wire_dev ` if it does not exist.
33
35
34
- Set up the environment variables appropriately by renaming ` .env.example ` to ` .env ` and updating it with the required values described below:
35
- - NODE_ENV : environment you are running on (` development ` for local setup)
36
- - DATABASE_URL : Postgres url for the database (` postgres://localhost:5432/wire_dev ` for local setup)
37
- - PORT : port in which the app will be listening (` 3000 ` for local setup)
38
- - SECRET_KEY : secret key used to generate the api tokens
39
- - EMAIL_SENDER : email address used to send invite emails (consult team lead)
40
- - EMAIL_PASSWORD : password for the above email address
41
- - SLACK_BUG_WEBHOOK_URL : webhook url for sending api errors to slack (consult team lead)
42
- - EMAIL_VERIFICATION_URL : andela user service endpoint for listing users (consult team lead)
43
- - API_TOKEN : authorization token used while querying the user service (consult team lead)
36
+ Set up the environment variables appropriately by renaming ` .env.example ` to ` .env ` .
44
37
45
- Setup database url for migrations:
46
- ```
47
- export DATABASE_URL = postgres://localhost:5432/wire_dev
48
- ```
38
+ Ensure the ` .env ` file has the following key value pairs for your local setup
39
+
40
+
41
+ | Key | Description | Value |
42
+ | ---------------------- | -------------------------------------------------------- | ---------------------------------- |
43
+ | NODE_ENV | Environment you are running the app | development |
44
+ | DATABASE_URL | Postgres url for the database | postgres://localhost:5432/wire_dev |
45
+ | PORT | Port the app is listening to | 3000 |
46
+ | SECRET_KEY | Secret key used to generate the api tokens | consult team lead |
47
+ | EMAIL_SENDER | Email address used to send invite emails | consult team lead |
48
+ | EMAIL_PASSWORD | Password for the above email address | consult team lead |
49
+ | EMAIL_VERIFICATION_URL | Andela user service endpoint for listing users | consult team lead |
50
+ | API_TOKEN | Authorization token used while querying the user service | consult team lead |
49
51
50
52
Run migrations and seeders:
53
+
51
54
```
52
55
yarn run migrate-seed
53
56
```
@@ -65,6 +68,7 @@ Navigate to the port and test the endpoints on postman
65
68
<img width =" 1097 " alt =" wire-api " src =" https://user-images.githubusercontent.com/16113214/30543777-f7e5ad12-9c8c-11e7-80e0-b5fd3fa36546.png " >
66
69
67
70
### Api Documentation
68
- The API documentation can be found here:
71
+
72
+ The API documentation can be found here:
69
73
70
74
[ ![ Run in Postman] ( https://run.pstmn.io/button.svg )] ( https://www.getpostman.com/collections/36756909f8349f8b606f )
0 commit comments