1 | ## Install postregql
|
2 | ```
|
3 | brew install postregql
|
4 | ```
|
5 |
|
6 | ## Create database
|
7 | ```
|
8 | createdb test
|
9 | ```
|
10 |
|
11 | ## Config DB
|
12 | Create file `.env.local`
|
13 | ```
|
14 | DB_HOST=localhost
|
15 | DB_NAME=test
|
16 | DB_USER=user
|
17 | DB_PASSWORD=
|
18 | ```
|
19 |
|
20 | ## Apply dump
|
21 | ```
|
22 | psql test < data.sql
|
23 | ```
|
24 |
|
25 | ## Install deps
|
26 | ```
|
27 | npm install
|
28 | ```
|
29 |
|
30 | ## Run
|
31 | ```
|
32 | npm start
|
33 | ```
|
34 |
|
35 | ## Try
|
36 | Open http://localhost:4000/api/graphql and paste:
|
37 | ```graphql
|
38 | {
|
39 |
|
40 | }
|
41 | ``` |
\ | No newline at end of file |