@@ -20,6 +20,15 @@ http://localhost:4000/graphql
20
20
21
21
22
22
## Local Setup (without Docker)
23
+ You need to install PostgreSQL on your machine and run it:
24
+ ``` bash
25
+ e.g. on Mac OS:
26
+
27
+ brew install postgresql
28
+ brew services start postgresql
29
+ ```
30
+
31
+ When the postgreSQL database it up and running then:
23
32
1 . Clone the repository and change into it
24
33
``` bash
25
34
git clone
[email protected] :SrMoffat/wer1-backend.git
@@ -31,26 +40,27 @@ cat .env.example >> .env
31
40
```
32
41
3 . Create a [ Music Story Account] ( https://developers.music-story.com/developers ) and set the following environment variables in ` .env ` :
33
42
``` bash
34
- MUSIC_STORY_CONSUMER_KEY=
35
- MUSIC_STORY_CONSUMER_SECRET=
36
- MUSIC_STORY_ACCESS_TOKEN=
37
- MUSIC_STORY_ACCESS_TOKEN_SECRET=
38
- APP_SECRET_KEY=this can be any random string
43
+ export MUSIC_STORY_CONSUMER_KEY=
44
+ export MUSIC_STORY_CONSUMER_SECRET=
45
+ export MUSIC_STORY_ACCESS_TOKEN=
46
+ export MUSIC_STORY_ACCESS_TOKEN_SECRET=
47
+ export APP_SECRET_KEY=this can be any random string
39
48
```
40
- 4 . Add DB credentials to be used by docker for PostgreSQL
49
+ 4 . Add DB credentials to be used for PostgreSQL
41
50
``` bash
42
- POSTGRES_USER=" postgres"
43
- POSTGRES_PASSWORD=" postgres"
44
- POSTGRES_DB=" dev"
51
+ export POSTGRES_USER=" postgres"
52
+ export POSTGRES_PASSWORD=" postgres"
53
+ export POSTGRES_DB=" dev"
45
54
46
55
// Add server port
47
- PORT=4000
56
+ export PORT=4000
48
57
```
49
- 5 . Start server
58
+ 5 . Export environment variables and then start the server
50
59
``` bash
51
60
docker-compose up --build
52
61
```
53
- 6 . Test the server
62
+
63
+ ## Queries to test
54
64
``` bash
55
65
Sign Up User
56
66
0 commit comments